Yes, but often need to edit the xml file with a text editor. It don't understand that it is UTF8 format without BOM. Maybe if file opened with BOM (doc.LoadFile) then write it back when saving (doc.SaveFile) and if it not then don't write?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
doc.LoadFile("utf8test.xml", TIXML_ENCODING_UTF8);
doc.SaveFile();
Missed BOM record "EFBBBF" at file beginning (using 2.4.0 RC)
TinyXml doesn't write the BOM mark. It is a Microsoft only convention, and UTF-8 is the default format for XML.
lee
Yes, but often need to edit the xml file with a text editor. It don't understand that it is UTF8 format without BOM. Maybe if file opened with BOM (doc.LoadFile) then write it back when saving (doc.SaveFile) and if it not then don't write?
That's a great suggestion. I'm actually in the middle of fixing some EOL normalization problems. I'll try to fix this as well.
lee