I want to call this URL using NSURLRequest:
http://www.test.com/query={"tag1":"üğişi","tag2":"çöçödd"}
These characters which are "üğişi" and "çöçödd" UTF8 character. I need to convert this URL to get response. Can you help me?
I want to call this URL using NSURLRequest:
http://www.test.com/query={"tag1":"üğişi","tag2":"çöçödd"}
These characters which are "üğişi" and "çöçödd" UTF8 character. I need to convert this URL to get response. Can you help me?
Use the -(NSString*)stringByAddingPercentEscapesUsingEncoding:(NSStringEncoding)encoding;
routine of th NSString
class. Like so:
NSString* url = @"http://www.test.com/query={\"tag1\":\"üğişi\",\"tag2\":\"çöçödd\"}";
NSString* urlEncoded = [url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];