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 ->', loc:GetString(s)==s) -- first
print( "s=='Maçã' ", s=='Maçã' ) -- second
---------------
On previous version of wxLua the first comparison return true.
But in the new version return false.
I suspect wxLua convert the lua_string to another charset(UTF-8) and
then it fail.
I edit my code with Scite. Running this file with wxLua the comparison
is false.
When I open the file in wxLua(editor) and run the comparison is true.
When I open the file in wxLua(editor) and save it and reopen with Scite
the charset has changed to UTF-8 and running it the comparison is true.
This is a big trouble to me.
Thanks
--
Marcos E. Wurzius
John Labenski escreveu:
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 compiled with Unicode and with the
MSW non-Unicode binaries I downloaded from Sourceforge.
Unless you mean that adding the code below is necessary to get it
working. If so, this is good news.
os.setlocale('US')
wx.wxLocale(wx.wxLANGUAGE_ENGLISH)
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!
Good, but again, the problem you're having doesn't seem right.
The c/cpp/h files in CVS have the line endings you download them with
using CVS. For example, in Linux they're LF, in MS Windows I use
cygwin's CVS client, but download them into a dir mounted with mount
-t -f "c:/" "/mnt/c" so cygwin translates them to CRLF. I don't
believe that any compiler cares if the source files have CRLF or just
LF, however the MS Windows compilers do have problems if their build
files (*.dsp for MSVC for example) are not CRLF.
I'd love to help, but I wonder if there isn't some other reason for
the problems you're having.
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
--
Marcos E. Wurzius
-------------------------------------------------------------------------
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