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
精彩评论