On Mon, Mar 2, 2015 at 3:54 AM, Victor Bombi <son...@telefonica.net> 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
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to