• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSURL String formatting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURL String formatting


  • Subject: Re: NSURL String formatting
  • From: Nick Zitzmann <email@hidden>
  • Date: Thu, 13 Nov 2003 00:02:43 -0800

On Nov 12, 2003, at 10:53 PM, Jason McInnes wrote:

When I NSLog escapedString, however, I get this:
http://www.usps.com:80/zip4/zip4_response.jsp? zipcode=98177&Selection=1&address=5672ain

\\u7400\\u34fe\\ud0bf\\uffe9\\u6c97\\ue382\\uf8bf\\uffe9treet(null)uite 2address1=5672ain(null)treet&address2=Suite2city=Shoreline&state=WA&urb anization=&firm=

How did you write the call to NSLog()? Did you write this:
NSLog(escapedString);

... or did you write this:
NSLog(@"%@", escapedString);

Judging by the output, I'm guessing you did the former. Just so you know, the former is the wrong way to pass a string to a function call that takes printf-style arguments, such as NSLog(), because if you do so, then the varargs functions see the percent-characters in the string and think they're arguments when they're not in this case. The latter, however, should work correctly.

Perhaps not unexpectedly, when I connect to the
server, I get an error:

How are you connecting to the server? NSURLHandle/CURLHandle? OWF? Manually using some networking framework? +somethingWithContentsOfURL:? Something else?

Nick Zitzmann
AIM/iChat: dragonsdontsleep
Check out my software page: http://seiryu.home.comcast.net/
S/MIME signature available upon request

"I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone." - Bjarne Stroustrup
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: NSURL String formatting
      • From: Jason McInnes <email@hidden>
References: 
 >NSURL String formatting (From: Jason McInnes <email@hidden>)

  • Prev by Date: images as tabviewitems
  • Next by Date: Re: Cocoa daemon
  • Previous by thread: NSURL String formatting
  • Next by thread: Re: NSURL String formatting
  • Index(es):
    • Date
    • Thread