• 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: Strange NSString result from NSURL ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange NSString result from NSURL ?


  • Subject: Re: Strange NSString result from NSURL ?
  • From: Scott Anguish <email@hidden>
  • Date: Wed, 28 Jan 2004 17:43:28 -0500

hrm..

instead of using NSString' stringWithContentsofURL, you could use NSURLConnection and download it as an NSData.

and perhaps file a bug for this other issue.

On Jan 28, 2004, at 4:11 PM, Guillaume Rager wrote:

Hi list,

I'm using the following code,

NSString* infobelRequest = @"http://infobel-new.whitepages.com/find_person_results.pl? qcitycode=&qstreetcode=&qnacecode=&c=&qcode=20877912&s=AL&l=john&f=paul ";

NSURL *requestURL = [NSURL URLWithString:
(NSString*)CFURLCreateStringByAddingPercentEscapes(NULL,(CFStringRef)in fobelRequest,NULL,NULL,kCFStringEncodingISOLatin1)];

to get the html code of this page, there are no problems with th CoreFoundation method just here before.

Just after i do that,

NSString *htmlString = [NSString stringWithContentsOfURL:requestURL];

and the htmlString becomes unreadable, like a garbage.

I think, its not an encoding problem, i try using loading NSString thanks to NSData and many kind of encoding like utf8, iso-latin etc...

So i would like to know, if someone has the same problem, or if there is solution using webkit/webcore ?

Thank you,


Guillaume

-----
GUMITECH - R&D Unit - Niort (France)
http://www.gumitech.com

"Chaud cocoa, chaud chocolat !!!"
_______________________________________________
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.
_______________________________________________
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.

References: 
 >Strange NSString result from NSURL ? (From: Guillaume Rager <email@hidden>)

  • Prev by Date: App won't launch again after user quits, only in 10.3, because of a thread?
  • Next by Date: Re: Any new/updated Cocoa books soon?
  • Previous by thread: Strange NSString result from NSURL ?
  • Next by thread: Re: Best way to implement calling another controller/class? [SOLVED]
  • Index(es):
    • Date
    • Thread