TinyXML and unicode

Started by
2 comments, last by MJP 15 years, 8 months ago
I looked into TinyXML in an attempt to get an XML parser up and running fast, but to my utter chock, the TiXmlDocument class' constructor only takes a char as its parameter for the file name... I need to be able to pass a wchar_t.. is this possible somehow? The thing is that I need to support all possible languages for the XML loading.
Advertisement
I know TinyXML can handle UTF-8 text in the XML file...perhaps it can use a UTF-8 string for the filename?

If not there's a method to load a document using a FILE pointer, so you could probably use _wfopen to open the file.

EDIT: I checked the TinyXML source and using UTF-8 isn't going to work, however using the FILE pointer should work fine.
Uhm, are you sure? I find nothing related to FILE in TinyXml...
TiXmlDocument::LoadFile(FILE* , TiXmlEncoding)

Like I said I'm not very familiar with TinyXML so no guarantees this will work...but from looking at the documentation and source I haven't seen any reason why it wouldn't.

This topic is closed to new replies.

Advertisement