Re: NSURL String formatting
Re: NSURL String formatting
- Subject: Re: NSURL String formatting
- From: Jason McInnes <email@hidden>
- Date: Thu, 13 Nov 2003 09:20:36 -0800 (PST)
Yeah, that one gets a D'oh!
So my escaped string is okay and my problem is with my
connection.
Thanks!
Jason
--- Nick Zitzmann <email@hidden> wrote:
>
>
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
>
=====
Jason McInnes
2 Degrees
Cell: 206.849.3680
Email: email@hidden
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
_______________________________________________
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.