Full Character set problem

Hi all,

I’ve read some post on the same topics but I could not resolve this problem.

On the loadFont example, the full character set loading is not working for me, with mac and XCode.

For example the “é” character is becomes a rectangle and some other ones goes crazy.

I’m just looking for latin characters like é á à etc…And I understand It should work only setting _bFullCharacterSet to true.

The only way I found to fix this was replacing all this characters by hexadecimal value ( for example : “\xEC” ) but that’s a quite painful process and I’m sure there would be another easy way.

I tried to change the encoding of my xml file, the font, but the result is the same.

Anyone had this problem before ?

Thanks

Anyone ?

Hi martial
Ya, I also had this problem… and also no solution yet…

my current workaround (working on mac) :

coding this:

text_XML.setValue(“SONDERZEICHEN:letter_a”, “à=\xE0 á=\xE1 â=\xE2 ã=\xE3 ä=\xE4 æ=\xE6”);
text_XML.setValue(“SONDERZEICHEN:letter_o”, “ò=\xF2 ó=\xF3 ô=\xF4 õ=\xF5 ö=\xF6”);
text_XML.setValue(“SONDERZEICHEN:letter_u”, “ù=\xF9 ú=\xFA û=\xFB ü=\xFC”);
text_XML.setValue(“SONDERZEICHEN:letter_e”, “è=\xE8 é=\xE9 ê=\xEA ë=\xEB”);
text_XML.setValue(“SONDERZEICHEN:letter_i”, “ì=\xEC í=\xED î=\xEE ï=\xEF”);
text_XML.setValue(“SONDERZEICHEN:letter_c”, “ç=\xE7 Ç=\xC7”);
text_XML.saveFile(“text.xml”);

saves my file as:

à=‡ á=· â=‚ ã=„ ä=‰ æ=Ê ò=Ú ó=Û ô=Ù õ=? ö=ˆ ù=? ú=? û=? ü=¸ è=Ë é=È ê=Í ë=Î ì=Ï í=Ì î=Ó ï=Ô ç=Á Ç=«

now i can copy&paste the shown characters…

or i can use:

à=&\#xE0; á=&\#xE1; â=&\#xE2; ã=&\#xE3; ä=&\#xE4; æ&\#xE6; ò=&\#xF2; ó=&\#xF3; ô=&\#xF4; õ=&\#xF5; ö=&\#xF6; ù=&\#xF9; ú=&\#xFA; û=&\#xFB; ü=&\#xFC; è=&\#xE8; é=&\#xE9; ê=&\#xEA; ë=&\#xEB; ì=&\#xEC; í=&\#xED; î=&\#xEE; ï=&\#xEF; ç=&\#xE7; Ç=&\#xC7;

codepage here -> http://htmlhelp.com/de/reference/html40-…-atin1.html

hm, … :?
greetings ascorbin

oh thanks!

I already saw your post, but I don’t understand how you are using this workaround, I mean with dynamic text.

The text I use is hosted on a server (xml) and may change sometimes, so I’m thinking in creating a class and replace all the characters by hexadecimal values…

If someone have another idea, welcome !

Thanks

here’s a function to change the special characters by their codes:

  
typedef struct{  
	string character;  
	string code;  
}charSubstitution;  
  
void subsChars(string & origString){  
	charSubstitution chars[]={  
			{"à","\xE0"}, {"á","\xE1"}, {"â","\xE2"}, {"ã","\xE3"}, {"ä","\xE4"}, {"æ","\xE6"},  
			{"ò","\xF2"}, {"ó","\xF3"} ,{"ô","\xF4"}, {"õ","\xF5"}, {"ö","\xF6"},  
			{"ù","\xF9"}, {"ú","\xFA"}, {"û","\xFB"}, {"ü","\xFC"},  
			{"è","\xE8"}, {"é","\xE9"}, {"ê","\xEA"}, {"ë","\xEB"},  
			{"ì","\xEC"}, {"í","\xED"}, {"î","\xEE"}, {"ï","\xEF"},  
			{"ç","\xE7"}, {"Ç","\xC7"}  
	};  
  
	for(int i=0; i<24; i++){  
  
		while(origString.find(chars[i].character)!=string::npos){  
			origString = origString.substr(0,origString.find(chars[i].character)) + chars[i].code + origString.substr(origString.find(chars[i].character)+2);  
  
		}  
	};  
}  

Ya! Thanks! :smiley:

Amazing!

Thanks Arturo :wink:

for me it worked to just encode my xml with Latin 1 in TextMate to show the propper symbols for ÄÖÜ äöü ß…