Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

McBgnr

macrumors regular
Original poster
Apr 13, 2009
144
0
Hello,

I wanted to extract the URL from cookes.plist (Safari). However the value for the cookie has some special characters. Thus as it is, this value cannot be used with the browser. How can I convert the value to canonical form so that I can use it for opening in a browser. I had tried using [NSURLProtocol canonicalRequestforRequest], but it did not work :-(

Suggestions are welcome.
 
Hello,

I came across a function stringByReplacingPercentEscapesUsingEncoding:
However when I tried using it as in

Code:
NSString* imageUrl = @"http://www.myurl.com/image.jpg";	
NSString* mapUrl = [imageUrl stringByReplacingPercentEscapesUsingEncoding:NSASCIIStringEncoding];

I am getting compile error saying:
error: syntax error at the end of input
warning:'@end' missing in implementation context

Any idea what this means.
 
I am getting compile error saying:
error: syntax error at the end of input
warning:'@end' missing in implementation context

Any idea what this means.

Most likely you have either not put @end at the end of your class definition or have failed to close a {} bracket set somewhere...
 
Oops... it was a missing closing brace.

Thanks for the helpful reply. Solved no :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.