unicode problem

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

mako
Just popping in
Just popping in
Posts: 3
Joined: Thu Mar 29, 2007 12:06

unicode problem

Postby mako » Thu Apr 26, 2007 19:52

maybe someone could help me with an issue with cegui editbox->getText();
I typed an accentuated word in the editbox like 'pé de sapé'.
when I try to pick the word

with the code
Code:

CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton();
CEGUI::String voc = wmgr.getWindow((CEGUI::utf8*)"editbox1");->getText();
const char* vocabulo = voc.c_str();


the accentuated letters becomes weird. and I can't get the word in its real form.
how can I set to "vocabulo" the word that I typed on the editbox?

pé de sapé becomes: pé de sapé

do someone knows what's going on?

User avatar
Dalfy
CEGUI Team (Retired)
Posts: 130
Joined: Tue Oct 11, 2005 16:13
Location: Paris, FRANCE
Contact:

Postby Dalfy » Fri Apr 27, 2007 05:51

The output of CEGUI::String::c_str() is encoded using UTF-8. Make sure the tool you use to visualize the output of your program understand utf-8 and that the tool understand that the file contains utf-8 sequence.

I hope it helps


Return to “Help”

Who is online

Users browsing this forum: No registered users and 9 guests