unicode problem on LuaScriptModule

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

Cloudage
Not too shy to talk
Not too shy to talk
Posts: 27
Joined: Thu May 28, 2009 11:37

unicode problem on LuaScriptModule

Postby Cloudage » Fri Sep 11, 2009 10:15

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?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: unicode problem on LuaScriptModule

Postby CrazyEddie » Sun Sep 13, 2009 07:26

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.

rockoz
Not too shy to talk
Not too shy to talk
Posts: 34
Joined: Tue Sep 22, 2009 02:26

Re: unicode problem on LuaScriptModule

Postby rockoz » Thu Jun 24, 2010 03:31

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.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: unicode problem on LuaScriptModule

Postby CrazyEddie » Thu Jul 01, 2010 08:44

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.


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 8 guests