Posted: 8/26/2011
I wrote a code to read data from php FORM and then convert it to XML data. When saving it to file it converts encoding to UTF-8 without BOM and then FLASH cannot read special characters. If I manualy save same file to UTF-8 then it works.Any suggestions???
Hi,
If the document starts with 0xFF 0xFE or 0xFE 0xFF then the document is UTF-16, if it starts with 0xEF 0xBB 0xBF then it is UTF-8. If neither is found, then there’s no BOM but the detection is about the same: the first character must be a greater then sign (now you know why there is no content or space allowed before it) and that sign is differently encoded in the three major Unicode encodings, including an EBCDIC version of Unicode.
This article will help you handle this issue: http://www.undermyhat.org/blog/2009/08/tip-force-utf8-or-other-encoding-for-xmlwriter-with-stringbuilder/
Best Regards,
Gjorgji