About the Multibyte language use Lua in CEGUI

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

tengdaping
Just popping in
Just popping in
Posts: 1
Joined: Fri Feb 13, 2009 06:05

About the Multibyte language use Lua in CEGUI

Postby tengdaping » Fri Feb 13, 2009 06:16

Hello,
I am a programmer from China, and I use CEGUI from the 0.4version, I like it very much.
And when I use the Chinese character to input into the Demo8(for the Demo8, I add the input support for the Chinese character),and it can be displayed correctly in the editbox, but when I click the "Add" button,the characters added into the Listbox is mistaken.
Sorry for my poor English , Who can help me about that? thank you!

haihuojiming
Just popping in
Just popping in
Posts: 10
Joined: Tue Jul 01, 2008 07:57

Re: About the Multibyte language use Lua in CEGUI

Postby haihuojiming » Fri Feb 13, 2009 08:18

http://www.cegui.org.uk/phpBB2/viewtopic.php?t=3770

you can read this post.

if u can write the codes in demo8.lue
"
function addItemHandler(args)
local winMgr = CEGUI.WindowManager:getSingleton()

local text = winMgr:getWindow("Demo8/Window1/Controls/Editbox"):getText()
local cols = CEGUI.PropertyHelper:stringToColourRect(winMgr:getWindow("Demo8/Window1/Controls/ColourSample"):getProperty("ImageColours"))

local newItem = CEGUI.createListboxTextItem(text, 0, nil, false, true)
newItem:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
newItem:setSelectionColours(cols)

CEGUI.toListbox(winMgr:getWindow("Demo8/Window1/Listbox")):addItem(newItem)
end
"
to c++ . it will be right. the question is lua do't support the unicode.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Wed Feb 25, 2009 08:00

I've seen a few of posts about this but not yet a proper selfcontained test case. If one could be provided, I'd be interested in seeing if there's any problems in the Lua binding related to this, in that case a few more modification to the tolua generator might do it...

Think of it as a small pet project for me to perhaps contribute a little to CEGUI again now and then.

Also I'm interested in using Lua for a few projects where decent handling of UTF-8 is critical (even if it requires a small utf8 library), so I have my own egoistic reasons to spend time on this as well.

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

Postby CrazyEddie » Wed Feb 25, 2009 13:58

lindquist wrote:Think of it as a small pet project for me to perhaps contribute a little to CEGUI again now and then.


As always, all contributions will be gratefully received; especially yours ;)

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 5 guests