• 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
Reading a text from web
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reading a text from web


  • Subject: Reading a text from web
  • From: Lorenzo <email@hidden>
  • Date: Fri, 16 Jan 2004 14:44:01 +0100

Hi,
I have just read a text from a web site with
-------------------
NSString *urlText = [NSString stringWithContentsOfURL:theURL];
-------------------
and it contains strings like
-------------------
&quot;
&#147;
&#148;
-------------------
How can I convert these strings to the right values?
All I need is a NSString containing what I can see when I open that text
page with a Browser, that is a simple readable text.

Also I tried to do:
-------------------
NSData *strData = [NSData dataWithContentsOfURL:theURL];
newStr = [[NSString alloc] initWithData:strData
encoding:NSISOLatin1StringEncoding];
-------------------
and I tried even NSUnicodeStringEncoding, NSUTF8StringEncoding
unsuccessfully.


Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
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.

  • Prev by Date: Re: Xcode and ObjectAlloc
  • Next by Date: Weird screen saver problem when passwort required to undim screen
  • Previous by thread: Re: Xcode and ObjectAlloc
  • Next by thread: Weird screen saver problem when passwort required to undim screen
  • Index(es):
    • Date
    • Thread