I am developing a RSS application in which title are in Japanese language.
I have grasped and display title in table cell but it is just showing me question marks (i.e. ?????????????
). How to tackle this?
The code by which I am receiving title and displaying it in table cell is below.
int blogEntryIndex1 = [indexPath indexAtPosition: [indexPath length] -1];
NSString *titlestring =[[blogEntries objectAt开发者_StackOverflow中文版Index: blogEntryIndex1] objectForKey: @"title"];
cell.textLabel.text=titlestring;
UIKit is fully capable of handling Unicode characters so the problem is most likely in your parsing of the RSS content - and particular the way you convert the feed data to an NSString.
In order to be able to parse the content correctly you need to know which encoding it is trasfered in. Unless this have explicitly been stated in the rss header, you could assume it's in UTF-8 format.
You have not described how you obtain the data from the feed and convert it into you internal representation, but make sure you convert it with the correct encoding.
精彩评论