Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#4647 Bug while READING the UTF8 file

1.x
open
nobody
None
5
2014-01-15
2014-01-15
otaxige
No

Hello.
for example, i have created a .php file in ANSI encoding (non-UTF8),
then, in the beggining wrote there a code, like <?php echo 'hello';?>,
then saved, then reopened and changed encoding to UTF8 and saved again.
DO you know what happened?
Notepad++ cant see, but in the start of the file, there is added an unknown character in front of <?php. Notepad ++ cant see, but HTML-Kit (another software like Notepad++) can see. THats because, that that extra character in the start of the file causes some errors in PHP programming.
here i have attached a sample file, where Notepad++ cant see that charachter, but if you open this file with HTML-KIT, you will see!

1 Attachments

Discussion

  • This is the intended behavior. The unknown character is the so called UTF8 byte order mark which is used to determine the endianness of a file. If you don't want to have the BOM because HTML Kit can't handle it, use the encoding "UTF-8 without BOM".

    http://en.wikipedia.org/wiki/Byte_order_mark