On Feb 8, 2008 11:38 AM, marcos <[EMAIL PROTECTED]> wrote:
> Hi, list,
>
> I have a very  strange error.
> On previous versions this works.
>
> The value seted and  returned from wxListBox are diferent.
> The value seted is 'Amanhã'.
>
> print(list:GetStringSelection()=='Amanhã') -> false
> But the interface show the same strings.
>
> Then I tested to encode the string, and the result is:
> print( encode( list:GetStringSelection())==encode('Amanhã') ) ->
> 416d616e68c3a3,  416d616e68e3
>
> The locale  is:
> lua locale: setlocale() ->  Portuguese_Brazil.1252
> wx locale: wx.wxGetLocale -> pt_BR
>
> What's happening?

I don't know.

Where are the functions "encode" and "setlocale" from?
What OS are you running and what wxLua binaries? Did you compile wxLua
yourself and if so with what Unicode settings?

Can you try to debug it this way

a = list:GetStringSelection()
b = 'Amanhã'
print(string.len(a), string.len(b))
for i = 1,string.len(b) do
    print(string.byte(a, i), string.byte(b, i))
end

Regards,
    John

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to