remove BOM byte (“” /ufeff””) from response

so im using m2e pro extension on magento 2.3 suddenly the synchronizing stopped from working. thats because that m2e pro uses their own cron job and they sends curl calls to the server, but my server response with BOM byte. script for exemple:

?php

$ ch = curl_init(); curl_setopt_array($ ch, array(

CURLOPT_URL => ‘http://my-sire-ip/index.php/M2ePro/cron/test/’,

CURLOPT_HTTPHEADER => array(‘Host: my-site-name.com’), CURLOPT_RETURNTRANSFER => 1 ));

var_dump(json_encode(curl_exec($ ch))); // return string(8) “”\ufeff””

// “\ufeff” – this is BOM byte it should not be in response.

the response is:

string(8) “”\ufeff””

this is what stopping from their cron to work on my server. how can i remove this BOM byte so it will work properly?