Re: [wxlua-users] string compare error

2008-03-25 Thread John Labenski
On Tue, Mar 25, 2008 at 7:35 AM, Eero Pajarre <[EMAIL PROTECTED]> wrote: > > >> > > >> WXDLLIMPEXP_WXLUA wxString lua2wx(const char* luastr) > > >> { > > >> return wxString(luastr, *wxConvCurrent); > > >> } > > >> > > >> const WXDLLIMPEXP_WXLUA wxCharBuffer wx2lua(const wxString& wxst

Re: [wxlua-users] string compare error

2008-03-25 Thread Eero Pajarre
> >> > >> WXDLLIMPEXP_WXLUA wxString lua2wx(const char* luastr) > >> { > >> return wxString(luastr, *wxConvCurrent); > >> } > >> > >> const WXDLLIMPEXP_WXLUA wxCharBuffer wx2lua(const wxString& wxstr) > >> { > >> wxCharBuffer buffer(wxstr.mb_str(*wxConvCurrent)); > >> return buffer; >

Re: [wxlua-users] string compare error

2008-02-18 Thread Hakkı Doğusan
Hi, John Labenski yazmış: > On Feb 18, 2008 12:06 AM, marcos <[EMAIL PROTECTED]> wrote: >> John Labenski escreveu: >> >> http://www.wxwidgets.org/manuals/stable/wx_wxstring.html#wxstring >> http://www.wxwidgets.org/manuals/stable/wx_unicode.html#unicode >> http://www.wxwidgets.org/manuals/stable/

Re: [wxlua-users] string compare error

2008-02-18 Thread John Labenski
On Feb 18, 2008 12:06 AM, marcos <[EMAIL PROTECTED]> wrote: > > John Labenski escreveu: > > http://www.wxwidgets.org/manuals/stable/wx_wxstring.html#wxstring > http://www.wxwidgets.org/manuals/stable/wx_unicode.html#unicode > http://www.wxwidgets.org/manuals/stable/wx_mbconvclasses.html#mbconvclas

Re: [wxlua-users] string compare error

2008-02-17 Thread marcos
John Labenski escreveu: http://www.wxwidgets.org/manuals/stable/wx_wxstring.html#wxstring http://www.wxwidgets.org/manuals/stable/wx_unicode.html#unicode http://www.wxwidgets.org/manuals/stable/wx_mbconvclasses.html#mbconvclasses http://www.wxwidgets.org/manuals/stable/wx_wxmbconv.html#wxmbconv

Re: [wxlua-users] string compare error

2008-02-14 Thread Hakkı Doğusan
Hi, John Labenski yazmış: > On Feb 12, 2008 3:05 AM, Hakkı Doğusan <[EMAIL PROTECTED]> wrote: >>[snip] > > The more I read about Unicode it seems like this is all we need. > http://www.wxwidgets.org/manuals/stable/wx_wxstring.html#wxstring > http://www.wxwidgets.org/manuals/stable/wx_unicode.html

Re: [wxlua-users] string compare error

2008-02-13 Thread John Labenski
On Feb 12, 2008 3:05 AM, Hakkı Doğusan <[EMAIL PROTECTED]> wrote: > > > > The problem with string comparison in the new version persists. > > > > -- > > wx.wxLocale( wx.wxLANGUAGE_DEFAULT ) > > local loc= wx.wxGetLocale() > > local s = 'Maçã' > > print(loc:GetString(s), s) >

Re: [wxlua-users] string compare error

2008-02-12 Thread Hakkı Doğusan
Hi, marcos yazmış: > Thanks John, > You are right! > > The problem with string comparison in the new version persists. > > > Please test this code on your machine: > > -- > wx.wxLocale( wx.wxLANGUAGE_DEFAULT ) > local loc= wx.wxGetLocale() > local s = 'Maçã' > print(loc

Re: [wxlua-users] string compare error

2008-02-11 Thread marcos
Thanks John, You are right! The problem with string comparison in the new version persists. Please test this code on your machine: -- wx.wxLocale( wx.wxLANGUAGE_DEFAULT ) local loc= wx.wxGetLocale() local s = 'Maçã' print(loc:GetString(s), s) print('loc:GetString(s)==s

Re: [wxlua-users] string compare error

2008-02-11 Thread John Labenski
On Feb 9, 2008 10:11 AM, marcos <[EMAIL PROTECTED]> wrote: > > Problem resolved! > > I tested the precompiled wxlua.exe and the error persisted. I don't understand. I just tried your listbox code in your last message ... local choices = {'Hoje','Amanhã'} ... and it worked fine in both in Linux c

Re: [wxlua-users] string compare error

2008-02-09 Thread marcos
Problem resolved! I tested the precompiled wxlua.exe and the error persisted. Comparing with previous version I saw different EOL. The code files (.c,.cpp,.h) in wxlua CVS repository had EOL = CRLF. Then I converted the files to LF and compiled. It's OK now! -- Marcos E. Wurzius

Re: [wxlua-users] string compare error

2008-02-08 Thread marcos wurzius
Here is a sample of the problem. - local encode = function(s) s = s or '' s = string.gsub(s, "(.)", function (c) return string.format("%02x", string.byte(c)) end) return s end -- portuguese locale -- os.setlocale('Portuguese - Br

Re: [wxlua-users] string compare error

2008-02-08 Thread marcos
John Labenski escreveu: Where are the functions "encode" and "setlocale" from? encode = function(s) s = string.gsub(s, "(.)", function (c) return string.format("%02x", string.byte(c)) end) return s end I must set locale in two env. lua: os.setlocale('Portuguese - Brazil') wx: wx.wxLocale(wx

Re: [wxlua-users] string compare error

2008-02-08 Thread John Labenski
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

[wxlua-users] string compare error

2008-02-08 Thread marcos
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