Hi John,

> Yes, note that From8BitData() is static and To8BitData() is not.

Thank you for the prompt change! Unfortunately, it didn't have the
desired effect for me; maybe I misread wxwidgets documentation.

Let's say I have three invalid UTF-8 characters: string.char(0x80,
0x81, 0x82). If I assigned them to a variable u, it has proper length
(#u == 3). If I try to add them to wxSTC, nothing happens (the length
of the content doesn't change).

If I use From8BitData(), then I get 6 bytes instead of 3:
#wx.wxString.From8BitData(string.char(0x80, 0x81, 0x82)) == 6, but
this looks like "fixed" UTF-8 code. When I add the result to wxSTC, I
do get 6 bytes of content there, but that's not what I expected: I
expected three characters displayed with 0x80, 0x81, and 0x82 as their
codes.

What am I doing wrong?

Paul.

On Wed, Feb 19, 2014 at 9:53 PM, John Labenski <jlaben...@gmail.com> wrote:
> On Wed, Feb 19, 2014 at 1:27 AM, Paul K <paulclin...@yahoo.com> wrote:
>>
>>
>> Do we also get To8BitData(), as I may need it to save the data back to a
>> file?
>>
>
> Yes, note that From8BitData() is static and To8BitData() is not.
>
> Regards,
>     John

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to