Page 1 of 1

unicode problem on LuaScriptModule

Posted: Fri Sep 11, 2009 10:15
by Cloudage
i have a big problem when i transfer some unicode string from lua script file to cegui.
here`s the script

Code: Select all

local logger = CEGUI.Logger:getSingleton()     
logger:logEvent( ">>> 中文测试" ) 


and the result i got is

Code: Select all

11/09/2009 18:05:49 (Std)    >>> ÖÐÎIJâÊÔ


during searching over the internet,i guess the problem may be the script is encoded with utf-8(and this seems the only encoding lua supported) and cegui uses another encoding.

my idea is write a function to build cegui strings with utf8 encoding and regist it to lua state,but this way will bring a function call around every uniconde string,it`s ugly.
so do we have any better solution?

Re: unicode problem on LuaScriptModule

Posted: Sun Sep 13, 2009 07:26
by CrazyEddie
Hi,

I've not tested this but think I can acknowledge this as an issue. I have to have a look at a couple of things, it may be a reasonably simple fix (maybe not though!).

CE.

Re: unicode problem on LuaScriptModule

Posted: Thu Jun 24, 2010 03:31
by rockoz
I've met the same problem, using Window setText()

It seems that LuaScriptModule didn't export a function to support constructing CEGUI::String with utf8 format.

Re: unicode problem on LuaScriptModule

Posted: Thu Jul 01, 2010 08:44
by CrazyEddie
I believe this issue to be fixed in the v0-7 and trunk branches of SVN (and also in the snapshot releases). I suggest you guys try those and report back :)

CE.