Hi John,

I'd like to come back to this topic; maybe it's something I'm doing
wrong and it's still possible to process those invalid UTF-8
characters? Any ideas?

Paul.

On Fri, Feb 21, 2014 at 4:53 PM, Paul K <paulclin...@yahoo.com> wrote:
> 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

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to