I tried loading the XML into an NSString using
initWithContentsOfURL:encoding:error using Latin1 encoding. Under
Leopard, the XML is read in just fine. I can output the resulting
string in the debugger and it looks good and is parsed just fine.
Under Tiger, the string is just a bunch of unicode escape sequences
and results in another empty document error after running through
NSXMLParser. I'm running on PPC with 10.4.11, if that matters at all.
Sounds like the document is not actually in ISO-Latin-1. It may be
that Leopard is detecting that you gave the wrong encoding and using
the correct one specified by the server instead, whereas Tiger just
uses what you gave it.
It's pretty rare that you need to force an encoding when downloading
text from a URL. Try using this NSString method, which will try to
determine the encoding automatically (either from the HTTP headers or
by sniffing the bytes):
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
This email sent to email@hidden