开发者

url encode non latin characters

I need to URL encode a non-latin string (japanese, chinese, or just non ascii characters in spanish/french/italian etc.). I can't find any encoders or snippets that deal with more than just ASCII characters to create a URL encoding. Is there a library or some feature I haven't found in OS that can create a fully compliant URL encoding from any UTF8 con开发者_运维百科tent?


Have you tried using

- (NSString *)stringByAddingPercentEscapesUsingEncoding:(NSStringEncoding)encoding

but specifying the appropriate NSStringEncoding related to the language choice?

You can see all the available string encodings here

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜