From: John L. <jla...@gm...> - 2015-03-05 05:40:23
|
On Mon, Mar 2, 2015 at 3:54 AM, Victor Bombi <so...@te...> wrote: > Where I say UNICODE it should be whatever internal widebyte encoding the > system and wxWidgets is using > wxWidgets has recently changed so that the >= 2.9 version always uses utf8 in the wxString. There's a list of what it accepts in the section "wxString <http://docs.wxwidgets.org/3.0/classwx_string.html> can be created from". http://docs.wxwidgets.org/3.0/classwx_string.html the problem is converting from ANSI to UNICODE > > wxLua unicode build converts as if the string were UTF8 to UNICODE: return > wxString(luastr, wxConvUTF8); > it works from code 1 to 127 (ASCii) but fails on 128-255 which are not > valid > UTF > 0 is discarded in lua2wx :if (luastr == NULL) return wxEmptyString; // > check > for NULL > which is a problem for lua strings with embeded ceros > > What do you plan to do with this wxString? You won't be able to display it in the GUI since the high ASCII chars usually just show up as boxes not as the DOS smiley faces and whatnot. I recommend sanitizing the string for display by replacing the extended ascii and controls chars with '?' for example. You can make an ANSI build of wxWidgets (frowned upon in wx versions >= 2.9) and see if that does what you want... Regards, John |