Verstuurd vanaf mijn iPhone

> Op 24 nov. 2014 om 05:15 heeft Jens Alfke <j...@mooseyard.com> het volgende 
> geschreven:
> 
> 
>> On Nov 23, 2014, at 1:06 PM, Diederik Meijer | Ten Horses 
>> <diede...@tenhorses.com> wrote:
>> 
>> When I just pull in the feed’s contents using a NSURLConnection, it will 
>> show up on some, but not all, devices.
> 
> What does "show up" mean in this case? Is there an error? If so, what is it?

It means that sometimes the feed is parsed into an NSArray of NSDictionairies 
that is datasource to a UITableView which loads fine, while in other cases no 
data gets shown in the TVC, it stays empty

I get no errors, but no results from the parser either. I haven't tested 
against didStartElement, because it seems clear that no data goes into the 
parser. NSJSONSeriliazation would throw a 'data is nil' error if it were JSON, 
NSXMLParser doesn't seem to do that

Can this be a special characters, "you should escape some of them" issue?

> 
>> When I try to log the response data, by creating a string that I init with 
>> the downloaded data and NSUTF8StringEncoding, the log will show a null 
>> string. So putting the downloaded data into a string using UTF8 doesn’t work.
> 
> UTF-8 is a completely different encoding.
> 
>> I validated the feed’s XML and got no errors..
> 
> It's valid XML, but it's got some problems as an RSS feed; take a look at
>       
> http://feedvalidator.org/check.cgi?url=https%3A%2F%2Fwww.taxpublications.deloitte.co.uk%2Ftis%2Fdtp.nsf%2Fpub1.xml
> These are mostly minor, like nonstandard extra elements, but it's also got 
> problems with its date formatting, and also the server reports the 
> Content-Type is ASCII while the XML says it's ISO-8859-1.
> 
> If NSXMLParser is having trouble with the encoding, one problem I've seen 
> before is documents that claim to be ISO-8859-1 while actually being 
> WinLatin, which is a superset with extra characters defined. (The Cocoa 
> encoding name for this is NSWindowsCP1252StringEncoding, IIRC.)
> 

Thanks, will try that

> (I spent four years of my life immersed in RSS feed parsing, and acquired a 
> solid contempt for the ability of the average web developer to construct a 
> valid feed. You would not believe how many messed-up feeds there are in the 
> real world.)
> 
> —Jens
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to