0

I have a .xml file containing some text. The text also has some German charcters (ä, ü, ö) in it. The XML file is encoded as UTF-8, wich makes it appear fine in every text editor and xcode.

But when showing the text on a Cocos2D CCLabelTTF (iPhone/iPad), the special characters get messed up. They are replaced by one or two ugly characters I have never seen before ;-)

Should I use a different encoding? Or is there a way to make Cocos2D get that right?

BTW: If I enter the same text directly into xcode (without using the xml file), the text shows up correctly on the label...

Boris
  • 8,551
  • 25
  • 67
  • 120
  • show how you read the xml file please. This is not about cclabelttf since direct entry in xcode produces the expected outcome. – YvesLeBorg May 03 '14 at 13:47
  • I'm using TBXML (http://www.tbxml.co.uk/TBXML/TBXML_Free.html). – Boris May 03 '14 at 23:24
  • look here see if it applies : http://stackoverflow.com/questions/3070374/utf8-from-web-content-xml-file-to-nsstring – YvesLeBorg May 03 '14 at 23:48

0 Answers0