unicode problem on LuaScriptModule
Posted: 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
and the result i got is
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?
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?