NSXMLDocument encoding

2008-05-05 Thread Robert Cerny
Hi folks, I use NSXMLDocument to parse web page content, which is in NSWindowsCP1250Encoding. However I don't get correctly encoded data from NSXMLNodes NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:url]]; NSData *webData = [NSURLConnection

Re: NSXMLDocument encoding

2008-05-05 Thread Ricky Sharp
On May 5, 2008, at 2:53 PM, Robert Cerny wrote: I use NSXMLDocument to parse web page content, which is in NSWindowsCP1250Encoding. However I don't get correctly encoded data from NSXMLNodes NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:url]]; NSData *webData =

Re: NSXMLDocument encoding

2008-05-05 Thread Robert Cerny
On 5.5.2008, at 22:41, Ricky Sharp wrote: On May 5, 2008, at 2:53 PM, Robert Cerny wrote: I use NSXMLDocument to parse web page content, which is in NSWindowsCP1250Encoding. However I don't get correctly encoded data from NSXMLNodes NSURLRequest *req = [NSURLRequest

Re: NSXMLDocument encoding

2008-05-05 Thread Jens Alfke
On 5 May '08, at 12:53 PM, Robert Cerny wrote: doc = [[NSXMLDocument alloc] initWithData:webData options:NSXMLDocumentTidyHTML error:error]; Try using -initWithContentsOfURL: instead — then it can see the HTTP headers, which

Re: NSXMLDocument encoding

2008-05-05 Thread Robert Cerny
Hi, On 5.5.2008, at 23:14, Jens Alfke wrote: On 5 May '08, at 12:53 PM, Robert Cerny wrote: doc = [[NSXMLDocument alloc] initWithData:webData options:NSXMLDocumentTidyHTML error:error]; Try using -initWithContentsOfURL:

Re: NSXMLDocument encoding

2008-05-05 Thread Ricky Sharp
On May 5, 2008, at 4:52 PM, Robert Cerny wrote: However I don't get correctly encoded data from NSXMLNodes Well, what *do* you get? Show us the data and what you expected. I get the data in us-ascii encoding. The accented characters are missing from output or changed to wrong letters