Chinese records of sqlite database are in not accessable in iphone app
I'm creating an iphone app. In which I'm reading data from the sqlite db and presenting it in the tableview control. Problem is that the data is in chinese language. Due to unknown reason, when I开发者_高级运维 read/fetch record from the sqlite table, some records are presented and other are missed by objc. Even objc reads some columns of the missing values, But returns the nil results of the some columns. In reality these columns are not empty. I tried many solutions but didn't find any suitable. Same database is working perfectly in the android version of the app. Any one can help>
here is the code of reading the chinese records from table
Quote *q = [[Quote alloc] init];
q.catId = sqlite3_column_int(statement, 0);
q.subCatId = sqlite3_column_int(statement, 1);
q.quote = [NSString stringWithUTF8String:(char *)sqlite3_column_text(statement, 2)];
and here is the some records which iphone misses 勇敢的心威廉·华莱士 心灵是自由的,鼓起勇气随心飞翔! 如果没有自由,一切都是空想。
Thanks
I have no experience with this, but I'm wondering if it's something to do with the particular characters. From reading through this link
Wikipedia - Unicode
It sounds like that could be an issue for some characters.
精彩评论