0

I'm sending a GET request and my url is

http://myurl.com/addpla?name=JJ Burger &category=Delicatessen and Other &location=Sao jose do Rio Preto

(I did use NSLog and it's correct)

but after

NSString *encodedURL = [url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

the url is:

http://myurl.com/addpla?name=JJ2urger0X1.8A1301528AP-685&category=Delicatessen0x1.8ac90146a39e1p-698nd2427076260ther0X1.442030000206P-1018&location=Sao1455040047316337024se0o2io¢e
stevekohls
  • 2,214
  • 23
  • 29
  • Please reformat your question, it is barely readable. In particular, use four spaces before your urls and not quotes blocks (`>`). – Guillaume Algis Jun 17 '13 at 13:02
  • Using exactly the same code I get: `http://myurl.com/addpla?name=JJ%20Burger%20&category=Delicatessen%20and%20Other%20&location=Sao%20jose%20do%20Rio%20Preto` which of course is correct... – Alladinian Jun 17 '13 at 13:04
  • 6
    How are you determining that this is the value of `encodedURL`? Might you be making the same `NSLog` mistake as [the poster in this question](http://stackoverflow.com/a/3141340/371228)? – bdesham Jun 17 '13 at 13:04
  • I determine because I use NSLog – user2486146 Jun 17 '13 at 13:07
  • @bdesham is probably right. Can you post your `NSLog` statement as well ? – Alladinian Jun 17 '13 at 13:09
  • NSString *encodedURL = [urlPlace stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSLog(encodedURL); – user2486146 Jun 17 '13 at 13:20
  • Kudos to @bdesham for guessing correctly! Should we close as a duplicate? – Martin R Jun 17 '13 at 13:26

0 Answers0