From: John L. <jla...@gm...> - 2015-03-05 18:05:32
|
On Thu, Mar 5, 2015 at 12:11 PM, Victor Bombi <so...@te...> wrote: > > > >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. > > Just would like to show áéíóú > > Ahh, ok. Below is a list of the UTF8 chars to use. http://www.utf8-chartable.de/ I ran this in wxLuaEdit and both wxMessageBoxes showed the char à I copied and pasted from the site above. ------------------------ lua_str="à" print (string.len(lua_str)) wx.wxMessageBox(lua_str) wx_str = wx.wxString(lua_str) print (wx_str:Len()) wx.wxMessageBox(wx_str) ------------------------ output: Running lua script 'untitled.lua*' : Thu Mar 5 13:02:55 2015 2 -- note 2 byte utf8 char 1 -- wx knows that this is just a single two-byte utf8 char ----------------------- Does this not work for you? Regards, John |