CEGUI utf8-input on EditBox[Solved]

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

feint1980
Just popping in
Just popping in
Posts: 7
Joined: Mon Aug 29, 2016 03:00

CEGUI utf8-input on EditBox[Solved]

Postby feint1980 » Sun Mar 26, 2017 13:17

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 .
Last edited by feint1980 on Mon Mar 27, 2017 14:50, edited 1 time in total.

User avatar
Ident
CEGUI Team
Posts: 1836
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: CEGUI utf8-input on EditBox

Postby Ident » Sun Mar 26, 2017 13:26

Wrong sub-forum. Moving.
CrazyEddie: "I don't like GUIs"

User avatar
Ident
CEGUI Team
Posts: 1836
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: CEGUI utf8-input on EditBox

Postby Ident » Sun Mar 26, 2017 13:29

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?
CrazyEddie: "I don't like GUIs"

feint1980
Just popping in
Just popping in
Posts: 7
Joined: Mon Aug 29, 2016 03:00

Re: CEGUI utf8-input on EditBox

Postby feint1980 » Sun Mar 26, 2017 14:05

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 .

User avatar
Ident
CEGUI Team
Posts: 1836
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: CEGUI utf8-input on EditBox

Postby Ident » Sun Mar 26, 2017 16:10

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.
CrazyEddie: "I don't like GUIs"

feint1980
Just popping in
Just popping in
Posts: 7
Joined: Mon Aug 29, 2016 03:00

Re: CEGUI utf8-input on EditBox

Postby feint1980 » Sun Mar 26, 2017 16:58

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 ? .

feint1980
Just popping in
Just popping in
Posts: 7
Joined: Mon Aug 29, 2016 03:00

Re: CEGUI utf8-input on EditBox

Postby feint1980 » Sun Mar 26, 2017 17:13

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

User avatar
Ident
CEGUI Team
Posts: 1836
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: CEGUI utf8-input on EditBox

Postby Ident » Sun Mar 26, 2017 18:19

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.
CrazyEddie: "I don't like GUIs"

feint1980
Just popping in
Just popping in
Posts: 7
Joined: Mon Aug 29, 2016 03:00

Re: CEGUI utf8-input on EditBox

Postby feint1980 » Mon Mar 27, 2017 04:04

thank you , I will have it debuged right away .

feint1980
Just popping in
Just popping in
Posts: 7
Joined: Mon Aug 29, 2016 03:00

Re: CEGUI utf8-input on EditBox

Postby feint1980 » Mon Mar 27, 2017 14:50

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


Return to “Help”

Who is online

Users browsing this forum: No registered users and 1 guest