From: Victor B. <so...@te...> - 2015-03-02 08:54:11
|
Where I say UNICODE it should be whatever internal widebyte encoding the system and wxWidgets is using as noted in http://www.joelonsoftware.com/articles/Unicode.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 using AddTextRaw uses the string as an already UNICODE string so 1-255 are visible althought 128-255 dont show ANSI caracters So would be ideal to having a function for converting from ANSI to UTF or UTF to ANSI (it depends on the ANSI codepage) as in http://docs.wxwidgets.org/trunk/overview_mbconv.html example 1 (or may be ANSI to UNICODE and UNICODE to ANSI) |