I have been having some problem with the stringByAddingPercentEscapesUsingEncoding:
method.
Here's what happens:
When I try to use the method to convert the NSString:
"..City=Cl&PostalCode=Rh6 0Nt"
I get this this..
"City=Cl&PostalCode=Rh62t"
It should be:
"..City=Cl&PostalCode=Rh6%200Nt"
What can I do about this? Thanks in advance !!
For me, this:
NSString *s=[@"..City=Cl&PostalCode=Rh6 0Nt" stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSLog(@"s=%@",s);
... outputs:
s=..City=Cl&PostalCode=Rh6%200Nt
You're most likely using the wrong encoding.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With