How can i transform a string that contains a url string to a url compatible string? i.e. place all the necessary % symbol, etc. I believe that in java it's encodeURLComponent and in php its urlencode. Is there a similar function on the iPhone?
I tried to use stringByAddingPercentEscapesUsingEncoding: but it doesn't do the job.
This my problem. I am downloading a file using a url and a urlrequest.
The url contains web auth in the format http://user:pass@somewebsite.com .
The problem is that users with special characters in their password can't download the data. If they have a / symbol or % or @, etc they get a bad url error message. It's pretty important i release a fix fast for this. Please help.
Perhaps you need to consider using CFURLCreateStringByAddingPercentEscapes. Or maybe find a way to percent-escape those characters in the password that are valid URL characters beforehand.