Re: Best encoding
Re: Best encoding
- Subject: Re: Best encoding
- From: Scott Anguish <email@hidden>
- Date: Fri, 8 Jul 2005 04:49:56 -0400
On Jul 8, 2005, at 4:31 AM, Lorenzo wrote:
Hi,
I download some rss files from the web and I read and show the text
using
stringWithContentsOfFile:filePath
encoding:NSISOLatin1StringEncoding
error:&error
Some rss requires NSISOLatin1StringEncoding, someone else requires
NSUTF8StringEncoding. So my question is: how can I detect what the
right
encoding I have to use?
In detail
----------
If I read the file A with NSISOLatin1StringEncoding I see the right
text.
If I read the file B with NSISOLatin1StringEncoding I see the wrong
text.
So I try to read the file B with NSUTF8StringEncoding and I see
the right
text. But if I read the file A with NSUTF8StringEncoding I get a nil
string.
download it and use NSXMLDocument to load it .. then you can get
the characterEncoding, assuming it's specified in the file
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden