Hi, Im working on simle RSS reader. This reader loads data from internet via this code:
NSXMLParser *rss = [[NSXMLParser alloc] initWithURL:[NSURL URLWithString:@"http://twitter.com/statuses/user_timeline/50405236.rss"]];
My problem is with encoding. RSS 2.0 file is supposed to be UTF8 encoded according to encoding attribute in XML file.
<?xml version="1.0" encoding="utf-8"?>
So when I download URLs content I get text truncated after first occurance of char with diacritics, example: ľ š č ť ž ý á í é, etc.
I tried to solve the problem by downloading URL as UTF8 string, I used this code:
NSString *rssXmlString = [NSString stringWithContentsOfURL: [NSURL URLWithString: @"http://www.macblog.sk/rss.xml"] encoding:NSUTF8StringEncoding error: nil];
NSData *rssXmlData = [rssXmlString dataUsingEncoding: NSUTF8StringEncoding];
Did not help. Thanx for your responses.