I have a label where I have to put a string in Chinese extracted from a database, but nothing comes out. I noticed that the string is not pulled from database, while all other work correctly. What can I do?
char *subTitle= (char*)sqlite3_column_text(statement,13);
NSLog(@" The sutitle is %s", subTitle);
//The sutitle is
rowTable.sottotitolo = [[NSString alloc]initWithUTF8String: subTitle];
NSLog(@"The subtitle is %@", rowTable.sottotitolo);
//The subtitle is
Using methods other than Western alphabet?
NSLog(@"The string in chinese is %@", self.chinaTable.subtitle);
//The string in chinese is
//is not printed to the screen,but the database is written correctly
self.labelTitle.text = self.chinaTable.subtitle;
//empty out
Thanks in advance
While you retrieving your data from sqlite, instead of specifying the encoding schema, use this:
Hope, it’ll solved your problem. 🙂