iOS and xml: I don't understand unicode...

Chris Sheffield cmsheffield at
Thu Dec 22 13:47:30 EST 2011

I need help. In more ways than one, but that's beside the point...

I have a utf-8 encoded xml file that I'm reading data from for display in a text field. Everything seems to work just fine except for certain unicode characters, such as the em dash ("—"). When I read in the text and then set the htmlText property of the field, those characters are getting garbled. Am I just not understanding how unicode works? Do I need to do something special to make these characters appear correctly?

What's strange is I can get that same character by using numToChar(209) in the LiveCode message box, but the character that is in my file does not seem to be the same one, even though on screen it looks identical. If I test it with something like:

	if numToChar(209) is in myText then

it returns false. I'm stumped.

Any help would be greatly appreciated.


Chris Sheffield
Read Naturally, Inc.

More information about the Use-livecode mailing list