Can't get UTF-8 characters from XML file displayed correctly (Cocoa Touch)
I'm trying to read an XML file with Japanese and Korean characters (encoded UTF-8) into a String like
NSString *s = [[NSString alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://.../data1.xml"] encoding:NSUTF8StringEncoding error:&e];
However, the output just gives me some wrong characters. I also tried use NSData, but the result was the same.
The same when I parse the XML file with
NSXMLParser *parser = [[NSXMLParser alloc] initWithContentsOfURL:URL];
The parser function just gives back gibberish.
When I write the data into a table cell (cell.text = ...), only the first character is displayed followed by "...".
Where can I start looking to get this right? I'm not so experienced in Cocoa yet, so I feel that I'm missing something simple here...
Thanks,
Thomas
iPod Touch, Mac OS X (10.5.5)