开发者

Double decoding Objective C/iPhone

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 ad开发者_JAVA百科vance.


decode it again using [NSSting stringWithUTF8String:charPtr];


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. &#x6C34 and so on?

If so, there exists a category that can help you with this. Specifically, look at -[NSString stringByDecodingHTMLEntities].

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜