Hi!

What about:

#ifdef win32
   TiXmlDocument doc( filename.toAscii().constData() );
#else
   TiXmlDocument doc( filename.toUtf8().constData() );
#endif


This piece of code improves the Utf-Support on Linux without touching 
win32. I don't care that much about UTF on windows as long we have no 
one who can build a windows version ;-) In the long run we should go for 
QtXml to read the xml data (in my opinion)..
- Sebastian

Gabriel M. Beddingfield schrieb:
> On Thu, September 25, 2008 2:49 am, Jakob Lund wrote:
>   
>> Wouldn't it be possible do do something like something like
>>
>> #ifdef WINDOWS
>>    TiXmlDocument doc( somehow_convert_to_utf16( filename ) );
>> #else
>>    TiXmlDocument doc( filename.toUtf8().constData() );
>> #endif
>>
>> (I made up the syntax, but you get the idea, right?)
>>     
>
> This won't work because UTF-8 uses char[] and UTF-16 uses wchar[]... but
> TinyXmlDocument only has constructors for char[] and std::string.  To make
> it work with UTF-16, we would need to change TinyXml to accept wchar* and
> std::wstring's.
>
> I don't think the latest release of TinyXml has a solution to this, either.
>
>   


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel

Reply via email to