[wx-dev] wxConvLocal and wxConvLibC was : Re: decomposed UTF8 for fn_str

Vadim Zeitlin vadim at wxwidgets.org
Mon Dec 3 13:00:41 PST 2007


On Mon, 3 Dec 2007 10:41:30 +0100 Stefan Csomor <csomor at advancedconcepts.ch> wrote:

SC> I have come a little bit closer to the true reason that the umlaut  
SC> file path didn't work, perhaps it is the choice of the default  
SC> wxMBConv, my UTF8 path is translated into wchar_t correctly via the  
SC> wxString::FromUTF8, then this runs by
SC> 
SC> wxString...
SC>   static wxCharBuffer ImplStr(const wchar_t* str)
SC>      { return ConvertStr(str, npos, wxConvLibc).data; }
SC> 
SC> so we now have wxConvLibc in there (which isn't worth much on OS X),  
SC> and since the wxString still does not know which encoding it carries  
SC> in ascii mode (btw: let's get rid of that, let them have the pain now  
SC> instead of later ... ),

 Well, we hope that there won't be that much pain... but just in case we're
wrong I'd like to delay removing the vestiges of ANSI build for slightly
longer.

SC> so I guess the problem is that wxConvLibc uses wcsrtombs which  
SC> apparently here just casts shorts to chars, so I end up with a king of  
SC> latin1 encoded string, and that one of course is not what wxConvLocal  
SC> expects

 So what should wxConvLibc be under Mac then? If OS X only supports UTF-8
encodings (and not ISO8859-X &c) then we could just make it the same as
wxConvUTF8 which would solve the problem, wouldn't it?

 Thanks,
VZ





More information about the wx-dev mailing list