I think I used it with normal chars and converted before I put the data in or out of tinyxml. Alternatively it shouldn't be too hard to get it to use std::wstring instead of std::string, I would have thought.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you're creating documents then it might be a good idea to create using utf-8. Windows 2000 and onwards provide the APIs for UCS-2 (Wide chars in Windows speak) to utf-8 conversion, and utf-8 is the default XML encoding so you don't even need to specify an encoding in the output XML.
If you're unlucky enough to need to parse documents in UCS-2 (Notepad -> Save as -> Unicode), then you need to write some code to read the file, look for a Byte order mark, remove it and convert the entire file to utf-8, then feed it to TinyXML
For the former you need my patch - if it still works - to ensure that the serialised XML does not get escaped when characters stray outside the non-ascii range.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello from germany,
has tinyxml still no UNICODE support?
If not, how does it work on Windows CE?
Andy
I think I used it with normal chars and converted before I put the data in or out of tinyxml. Alternatively it shouldn't be too hard to get it to use std::wstring instead of std::string, I would have thought.
If you're creating documents then it might be a good idea to create using utf-8. Windows 2000 and onwards provide the APIs for UCS-2 (Wide chars in Windows speak) to utf-8 conversion, and utf-8 is the default XML encoding so you don't even need to specify an encoding in the output XML.
If you're unlucky enough to need to parse documents in UCS-2 (Notepad -> Save as -> Unicode), then you need to write some code to read the file, look for a Byte order mark, remove it and convert the entire file to utf-8, then feed it to TinyXML
For the former you need my patch - if it still works - to ensure that the serialised XML does not get escaped when characters stray outside the non-ascii range.