Reputation: 1
does someone know how i can correctly decode double encoded UTF8 strings? I use the NSXMLParser which decodes it once but after that i'm stuck with a string showing UTF8 encoded characters.
Thanks in advance.
Upvotes: 0
Views: 335
Reputation: 11330
What precisely do you mean by "decode double encoded UTF-8 strings"? By a string "showing UTF-8 encoded characters", do you mean character entity references, e.g. 水
and so on?
If so, there exists a category that can help you with this. Specifically, look at -[NSString stringByDecodingHTMLEntities]
.
Upvotes: 0
Reputation: 39988
decode it again using [NSSting stringWithUTF8String:charPtr];
Upvotes: 1