I have searched a lot about UTF8 decoding, but not found the answer yet.
I receive an UTF-8 decode NSString from my NSXMLParser:
NSString *tempString = @"Test message readability is óké";
In someway I can’t find the way to change this encoded text to:
Test message readability is óké
I could tell all the options I tried but I don’t think that should be necessary. Could please some help?
Thnx!
The
NSXMLParserwill treat the text using the character encoding that the XML specifies. I believe in your case the XML do not specify UTF-8 explicitly.The text seems to be ISO Latin 1. If you can not do anything about the server generating the XML then you can apply this hack:
I have verified that this works by testing this from the GDB prompt: