Hello. I have a request for some PHP file. The script in this file prints some data, for example:

printf("E1"); printf("OK.%d", $id);//например OK.342 

And I have a client with ++ WinHttp that can get a response from the script. Unfortunately, the answer is not "E1", instead it comes

 "п»їE1" "п»їOK.342" 

I have no idea why this is happening. Also, I wrote a PHP test script that gets "E1" without this garbage. Can someone help sort out?

upd. I tried to change the encoding of the PHP file. No change except UTF-8:

 "п»їп»їE1" 

And no difference with UTF-8 (w / o BOM) and ANSI

  • I may not understand something, but with ANSI - the same song - b2soft
  • put the encoding of this file and the dbconnect.php file (which is included in the script) on ANSI and the problem disappeared. Why? - b2soft
  • one
    Miracles do not happen. See not the editors / IDE that these characters can eat, but something more appropriate, starting with hex-viewers (yes at least Shift + F3 in Midnight Commander / FAR) and ending with the banal cat myfile.php . - user6550

1 answer 1

look for utf-bom in files

  • Guys, thank you and colleagues with stackoverflow Translated into UTF-8, there really are three characters (used to translate Notepad ++) Removed, everything works, thank you all - b2soft