Page 2 of 2

Posted: Tue Aug 30, 2005 6:31 pm
by Jellybean
Those three bytes means that you have saves the file as UTF-8 instead of ANSI.
Image
See where it says ANSI. Make sure it doesn't say anything else.

Posted: Tue Aug 30, 2005 10:12 pm
by PB
> Those three bytes means that you have saves the file as UTF-8 instead of ANSI

Ahhh, I see -- my Notepad "Save As" prompt does indeed have UTF-8 as
the default instead of ANSI. I changed it to ANSI and now it all works as
expected. Thanks for solving this for me! :)

Posted: Wed Aug 31, 2005 6:08 pm
by Xombie
It's a byte order mark. http://www.unicode.org/faq/utf_bom.html#BOM

I had to learn all about this when I was writing my unicode file handling procedures. I have this code posted under Tips & Tricks if you're interested. One of the functions is a SkipBOM() function that will seek past this field based on the type. UTF-8, UTF-16 and UTF-32 all have their own numbers. Plain ansi would have no BOM.

Hopefully nobody else already answered this. I just skimmed the replies quickly since I'm at work. >_>