Problem with UTF8 on itgb 1.4.1 and 1.5 [SOLVED]
by Edoardo · in iTorque 2D · 10/11/2011 (2:24 am) · 3 replies
If I use utf8 text on editor work correctly... but if I set the t2dTextObject at runtime doesn't work correctly (the particulars chars are not displayed)
Code used to set the text at runtime: textObject.Text = $Locale::VarWithUTF8Text;
This is a big problem for automatic localizations....
Can anyone help me?
Thanks
Code used to set the text at runtime: textObject.Text = $Locale::VarWithUTF8Text;
This is a big problem for automatic localizations....
Can anyone help me?
Thanks
About the author
The creator of HOOGA (available on Apple Store)
#2
Thanks for your response but your solution down't work for me :(
this is the test:
On Editor iT2D 1.4.1 :
before:
after scene saved:
Another issue.... When I save text object with "special characters" the editor crash.
10/17/2011 (4:24 am)
Hi Marc,Thanks for your response but your solution down't work for me :(
this is the test:
On Editor iT2D 1.4.1 :
before:
after scene saved:

Another issue.... When I save text object with "special characters" the editor crash.
#3
replace the code into StringBuffer.cc:
10/17/2011 (9:06 am)
I've found the error:replace the code into StringBuffer.cc:
//Luma: Version of StringBuffer that doesn't convert to UTF16 for performance reasons
StringBuffer::StringBuffer(const UTF8 *in, bool bNoConvert)
: mBuffer(), mBuffer8()
{
SBMAddThisStringBuffer();
setNoConvert(in);
}with this://Luma: Version of StringBuffer that doesn't convert to UTF16 for performance reasons
StringBuffer::StringBuffer(const UTF8 *in, bool bNoConvert)
: mBuffer(), mBuffer8()
{
SBMAddThisStringBuffer();
if(bNoConvert){
setNoConvert(in);
}else{
set(in);
}
}
Torque 3D Owner Marc Dreamora Schaerer
Gayasoft
Its easy to fix: add a dummy text object that has present all letters you will use throughout the applictaion that uses the font and it will be generated with all them :)