Hi I'm trying since 1 week to put a french accent like Ã© in a label
But It 's allways buging in quickgui .
I use arial.ttf like that
missed I something ?
ps:arial.ttf allowing french accent
Are you using GUIManager::setSupportedCodePoints? Make a list of all code points you want to be able to display on the screen and call this function.
hi! i don't know if it is the same thing, but i tried to to the same thing with a text box. if i use "setText("Ã©"); the application crash...i don't know if the fact that is an UTF string can serve...
If it crashes, post the line of code that is causing the crash.
this is the code:
QuickGUI::TextBox* tb123 = mPanel->createTextBox();
and this is the stack call...
kernel32.dll!RaiseException() + 0x52 byte
msvcr80d.dll!_CxxThrowException() + 0x50 byte
prova_QuickGUI.exe!Ogre::UTFString::_verifyUTF8(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & str="Ã¨ natale") Riga 2153 + 0x41 byte C++
prova_QuickGUI.exe!Ogre::UTFString::assign(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & str="Ã¨ natale") Riga 1220 + 0x9 byte C++
prova_QuickGUI.exe!Ogre::UTFString::assign(const char * c_str=0x0045fa0c) Riga 1253 + 0xc byte C++
prova_QuickGUI.exe!Ogre::UTFString::UTFString(const char * c_str=0x0045fa0c) Riga 859 C++
prova_QuickGUI.exe!SimpleGUIDemoApp::createGUI() Riga 362 + 0x10 byte C++
to bypass the problem i don't write "Ã¨" but "e' "...maybe this is a problem in Ogre and not in quickgui.i use the latest svn of quick gui and the ogre SDK 1.4.5
i try this code also in the demo and it crashes too...
It looks like the problem is with creating an Ogre UTFString, but you won't be sure unless you debug it. Are you able to step into the code and see what's happening? Are you running in debug mode? The call stack doesn't look very accurate..
the problem is in the validation and creation of the Ogre UTF string because throw an exception "bad UTF-8 continuation byte", and yes i am in debug mode.
what do you mean for "be able to step into the code and see what's happening"?put interruptions points?
put interruptions points?
Yep. I don't know what IDE you're using, but it would be helpful to put in breakpoints and step through the code, so you can see whats happening when the crash occurs, as well as the inputs that are used in the functions.
i have "forced" the progress in the program after the setText call and i have noted that in the text box the mData variable of mCaption have this value "è ®atale" and the mData of mOutput too.
name = mData
value = "è ®atale"
type = std::basic_string<unsigned short,std::char_traits<unsigned short>,std::allocator<unsigned short> >
i don't know what to do...
ok. i'll try to update the ogre to 1.4.6 and then try.
I have same probleme segfault in Ogre utf8 string if it's work fine with Ogre 1.4.5 say me because I'm desapointed now !!!
have I to do GUIManager::setSupportedCodePoints
only for displaying accent or doest it not crached if I do that ?
And can you says me how code_point works ?
like that ? Ogre::UTFString::code_point code = "Ã©"
Maybe you could try this
code_point 33-166 192-255
to add Latin-1 unicode char to Ogre
well! so adding that code in the font file and use the GUIManager::setSupportedCodePoints can correct this crask?
It doesnt work dragon I allways have segfault in utf8 verify
Basically if you can get characters rendering using the Ogre Overlay system you can get them rendering with QuickGUI. Post on the main Ogre forums if you have problems with UTF and using non-english characters, I can't really help here.