function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mariem MejrissiMariem Mejrissi 

Rest API Apex

Hi everyone ! 
How can I fix this problem 
User-added imageUser-added imageAny Help Please !! 
SwethaSwetha (Salesforce Developers) 
HI Mariem,
Recommend reviewing solution listed here (

"Unicode character 0xfeff is a BOM (Byte Order Mark), and not part of any valid Unicode character page. Some systems may emit this value at the beginning of a file, but Apex doesn't recognize those bytes, causing the problem you see here. As a quick fix, remove those values from the beginning, if present:

String fixedString = EncodingUtil.convertFromHex( EncodingUtil.convertToHex(Blob.valueOf(sourceString)) .removeStart('feff').removeStart('fffe') ).toString();

Note: if you're starting with a Blob already, don't use Blob.valueOf.
Alternatively, fix the source to exclude these two bytes, if possible (some text editors include the ability to emit or omit the BOM, depending on a setting or flag)."

If this information helps, please mark the answer as best. Thank you