tags:

views:

70

answers:

1

I need to convert a NSString to a NSURL using the iso-8859-1 instead of UTF8 (like here: http://stackoverflow.com/questions/1927127/re-encode-url-from-utf-8-encoded-to-iso-8859-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!

+1  A: 

You probably want the NSString method stringByAddingPercentEscapesUsingEncoding:

David Gelhar
Worked using the NSISOLatin1StringEncoding encoding! thanks!
cesarnicola