Chinese Support

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Lustres
Posts: 4
Joined: Sat Jan 09, 2016 4:13 am

Chinese Support

Post by Lustres »

Hi Everyone.
I use Irrlicht on Mac.
The system is OS X 10.11
And I found that IGUIEditBox can display Chinese character but cannot accept Chinese input. :( :( :(
Am I use the wrong method ?

Code: Select all

 
editBox = env->addEditBox(L"", rect<s32>(260, 72, 390, 92), true, wFilter, EDITBOX_KEYWORD);
editBox->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
 
Last edited by Lustres on Sun Jan 10, 2016 4:21 am, edited 3 times in total.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Chinese Support

Post by hendu »

The built-in font only includes ascii chars. You'd need to use one of the truetype extensions and bring your own font.
Lustres
Posts: 4
Joined: Sat Jan 09, 2016 4:13 am

Re: Chinese Support

Post by Lustres »

The shortcuts like command+v, command+c are not work either. :(
I mean shortcuts doesn't work under any languages.
if i press command + v, it only get 'v'
Last edited by Lustres on Sun Jan 10, 2016 4:23 am, edited 3 times in total.
Lustres
Posts: 4
Joined: Sat Jan 09, 2016 4:13 am

Re: Chinese Support

Post by Lustres »

hendu wrote:The built-in font only includes ascii chars. You'd need to use one of the truetype extensions and bring your own font.
Thanks. I checked the font and it contains Chinese font. And I changed a another font but still doesn't work ......
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Chinese Support

Post by CuteAlien »

With chinese input you mean the one where you type several western characters to get one chinese character? Unfortunately we do not support that.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
lvgeng
Posts: 38
Joined: Fri Aug 14, 2015 4:35 pm

Re: Chinese Support

Post by lvgeng »

CuteAlien wrote:With chinese input you mean the one where you type several western characters to get one chinese character? Unfortunately we do not support that.
Well... I think the poster means that they has their own input method, but the textbox provided by irrlicht cannot receive the output of the input method. As the others told before, No Ctrl + C or Ctrl + V. I think the reason is the textbox cannot link to the operating system.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Chinese Support

Post by CuteAlien »

I'm not sure why copy-paste wouldn't work. That usually does. Unless this is on Linux/X11... there it only got repaired very recently (in svn trunk).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Lustres
Posts: 4
Joined: Sat Jan 09, 2016 4:13 am

Re: Chinese Support

Post by Lustres »

CuteAlien wrote:With chinese input you mean the one where you type several western characters to get one chinese character? Unfortunately we do not support that.
Uhhhhh…… Yes we input some Latin characters and get Chinese character :( :( :(
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Chinese Support

Post by Mel »

I thought that through Unicode you could support any language :/
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Chinese Support

Post by CuteAlien »

@Mel: It's about entering those characters. Keyboards with all chinese characters are huge (I think some exist...) - so generally you kinda type the word which is wanted to get the corresponding single sign.

But copy-paste should always work. Unfortunately I don't have OS X so I can't test if there is any problem there.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
kormoran
Posts: 47
Joined: Mon Dec 28, 2015 4:50 pm
Location: Tolentino

Re: Chinese Support

Post by kormoran »

Chinese, Japanese, Korean etc. uses IME input methods: you type a bunch of latin chars (guo3, ba1, mei2... e.g. in "guo3" guo is the western phonetic, 3 is the kind of accent) and the terminal composes the corresponding ideogram. Irrlicht does NOT support IMEs yet :cry:

To support them yourself, you need to catch two GUI events, EGET_EDITBOX_ENTER to know when to start IME composition and EGET_ELEMENT_FOCUS_LOST to know when to stop... for the IME itself, both windows and linux support some different IMEs, taking advantage of them would be the best solution, if possible. :?:

EDIT: SDL2 does support IME input, maybe a peek in their code can give you some pointers :wink:
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Chinese Support

Post by CuteAlien »

@kormoran: It's not so easy. Because ime uses native windows api's - which won't help you much once you are using OpenGL or DirectX.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply