NSURL encoding using iso-8859-1 instead of UTF8
I need to convert a NSString to a NSURL using the iso-8859-1 instead of UTF8 (like here: Re-encode url from utf-8 encoded to iso-88开发者_StackOverflow社区59-1 encoded) but i don't know how to achieve it.
For example:
http://www.example.com/català
should be
http://www.example.com/catal%E1
insted of
http://www.example.com/catal%C3%A0
Thanks in advice!
You probably want the NSString method stringByAddingPercentEscapesUsingEncoding:
精彩评论