Yes this works because we have
lua_str="\195\160" UTF8 code for à 

but I would like to open a plain ASCii file in which à is coded as 0xE0 in my 
locale
and then
wx_str = wx.wxString(lua_str, wxFONTENCODING_ISO8859_1) (or something similar)
to get it converted to UNICODE
  ----- Original Message ----- 
  From: John Labenski 
  To: wxlua-users@lists.sourceforge.net 
  Sent: Thursday, March 05, 2015 7:05 PM
  Subject: Re: [wxlua-users] wxString::ToAscii


  On Thu, Mar 5, 2015 at 12:11 PM, Victor Bombi <son...@telefonica.net> 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













------------------------------------------------------------------------------


  ------------------------------------------------------------------------------
  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
------------------------------------------------------------------------------
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