Page 1 of 1

CEGUI utf8-input on EditBox[Solved]

Posted: Sun Mar 26, 2017 13:17
by feint1980
hi , is there a way that you can type in the editbox an utf8 encoding ?
I can set it utf8 when using the setText function like this

textbox->setText((CEGUI::utf8*)"Đăng nhập"));

but when I try to type something utf8 in , it's disappear , is there any setup am I missing ?

sorry for my bad English .

Re: CEGUI utf8-input on EditBox

Posted: Sun Mar 26, 2017 13:26
by Ident
Wrong sub-forum. Moving.

Re: CEGUI utf8-input on EditBox

Posted: Sun Mar 26, 2017 13:29
by Ident
You obviously didnt read the forum guidelines. You give us absolutely no info about what version you use or on what platform. Nobody can help you like this.

Did you even compile CEGUI with unicode support?

Re: CEGUI utf8-input on EditBox

Posted: Sun Mar 26, 2017 14:05
by feint1980
sorry for that , I use window os ( Window 7 64 bit) , CEGUI 0.8.4 .
what do you mean compile the cegui in unicode support ? compile the cegui lib with unicode encoding in Visual Studio ?
also the font demo is the same , it show the full font in Vietnamese , but when I try to type in (it is a multiline editbox btw ) the character still disapear , I hope my post doesn't anoying you .

Re: CEGUI utf8-input on EditBox

Posted: Sun Mar 26, 2017 16:10
by Ident
So you are saying the Font demo displays vietnamese text fine but you can't input vietnamese text there? If it displays vietnamese text then you did compile it with unicode CEGUI setting (see CMake settings) so you did everything right so far.

Re: CEGUI utf8-input on EditBox

Posted: Sun Mar 26, 2017 16:58
by feint1980
thank you , is there a function I have to call after I create a editbox or something ?
because if I use the setText function , it display the character OK , but when I start typing some Vietnamese in , it's disappear .
also I read the Demo , did I miss something ? .

Re: CEGUI utf8-input on EditBox

Posted: Sun Mar 26, 2017 17:13
by feint1980
also here is the picture .

the demo ( old and the 0.8.7)
Image

my project
Image


Edited : I already swap the new dll i built to the project , still nothing happend

Re: CEGUI utf8-input on EditBox

Posted: Sun Mar 26, 2017 18:19
by Ident
If it works via setText then the issue is how characters are injected. Have you tried to debug that part? It might be this was not tested well in certain setups. The demo you showed - what does it use? You didnt give us any info on that - the log would have provided it.

GLFW, SDL and the others might inject inputs differently.

Re: CEGUI utf8-input on EditBox

Posted: Mon Mar 27, 2017 04:04
by feint1980
thank you , I will have it debuged right away .

Re: CEGUI utf8-input on EditBox

Posted: Mon Mar 27, 2017 14:50
by feint1980
indeed , the injection was failed because the SDL2 removed the unicode from sdl1.2 , so I used the custom unicodeset and it work now , thank you