actually wxMBConv and derived should be implemented because "Lua uses ANSI
8-bit strings" as says the wxLua manual but you can get in them every kind of
data : unicode strings or embeded zeros.
So instead of needing require"iconv", wxLua would be enought
----- Original Message -----
From: Victor Bombi
To: wxlua-users@lists.sourceforge.net
Sent: Sunday, March 01, 2015 8:37 PM
Subject: Re: [wxlua-users] wxString::ToAscii
the problem is converting from ANSI to UNICODE
wxLua unicode build converts as if the string were UTF8 to UNICODE
it works from code 1 to 127 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)
----- Original Message -----
From: Paul K
To: wxlua-users@lists.sourceforge.net
Sent: Sunday, March 01, 2015 6:50 PM
Subject: Re: [wxlua-users] wxString::ToAscii
Hi Victor,
> editor:AddText(wx.wxString(_text):ToUTF8())
>
> only show caracters from 1 to 127 (fails with i=0,255)
>
> With Notepad plus I can convert it (i=0,255) to UTF save to a file and if
If you are trying to convert to/from UTF8, you may want to check this
discussion (http://sourceforge.net/p/wxlua/mailman/message/32175781/) and the
methods described in it. See if this helps.
Paul.
----------------------------------------------------------------------------
------------------------------------------------------------------------------
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
------------------------------------------------------------------------------
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