开发者

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:

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜