On Tue, Aug 10, 2010 at 11:06 PM, Chunlin Zhang <zhangchun...@gmail.com> wrote:
> These days I am writing a program with wxlua,and I want it to run in windows 
> and
> linux.But I the charset encoding/decoding is a problem.
>
> For example I want to take a string from wxTextCtrl to handle,and I wish it 
> is a
> Unicode string,but I found that when in linux,this string is a "utf8"
> string,when it is windows,this string is a "ansi" string,that is to say,if it 
> is
> a chinese windows,the string will be "gbk" string.(I am using wxlua in
> LuaForWindows in windows)

They probably compiled it in ANSI mode and not Unicode. Note however
that Lua is strictly ANSI only.

> And I found that wxlua's wxString is simple,do not have the "ToUTF8()" or
> "ToStdWstring()" method now.If this method can be supported in wxlua,I can 
> get a
> unicode string.

I didn't include them since I assumed that once it was converted to a
Lua C string all would be lost. I have added them in CVS, in fact if
you built it for GTK you can very easily add whatever else may be
necessary by editing wxLua/bindings/wxwidgets/wxbase_data.i and then
running "$make -B" in wxLua/bindings. You can also modify
wxLua/modules/wxbind/src/wxbase_data.cpp if the code needs to be
fixed, however these changes will be lost when you regenerate the
bindings, but it makes it easy to try things out or insert debugging
wxPrintf() statements.

> Another thing is :Does this bug will be
> fixed?:http://article.gmane.org/gmane.comp.lib.wxwidgets.wxlua.user/2616

Let me get back to you about that.

-John

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to