Hello I have any problems, I need writing in listboxtextitem a special character as "Ñ" but debuging my code i looked at CEGUI::String do not show it into the variable as "Ñ" else it show as a symbol when I use a CEGUI::utf8. And if I use CEGUI::utf32 it do not decode my characters and inside the listboxtexitem appear strange symbols. What can I do for solve my problem??
Thanks you and greeting to all.
writing special characters in a ListboxTextItem
Moderators: CEGUI MVP, CEGUI Team
-
- Just popping in
- Posts: 2
- Joined: Thu Nov 04, 2010 15:47
Re: writing special characters in a ListboxTextItem
CEGUI::String uses utf32 internally. That means that all characters inside it are converted to utf32. To see it in your debugger as utf8 you have to call CEGUI::String::data() to get utf8 encoded data (the buffer is automatically allocated for you).
Make sure your source code is encoded in utf8! Otherwise the characters appended from it will likely be garbage.
Make sure your source code is encoded in utf8! Otherwise the characters appended from it will likely be garbage.
-
- Just popping in
- Posts: 2
- Joined: Thu Nov 04, 2010 15:47
Re: writing special characters in a ListboxTextItem
Thank for your answer, in fact I was using String.data() and I cheked my code and it is in utf8. but I do not understand why my code source decode can influence in it. Beside I readed in CEGUI documentation that:
"The use of extended ASCII characters (with values >0x7f) would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable results."
It is in constructor CEGUI::String(const utf8 *utf8_str ) , at now is it affecting into the member class or only in the constructor conversion. I do not get show in screen any characters.
Greetings.
"The use of extended ASCII characters (with values >0x7f) would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable results."
It is in constructor CEGUI::String(const utf8 *utf8_str ) , at now is it affecting into the member class or only in the constructor conversion. I do not get show in screen any characters.
Greetings.
Who is online
Users browsing this forum: No registered users and 33 guests