I’m using SQLite database in my application and i need to get data from table (UTF8 Cyrilic). I’ve tried 2 methods this
NSString *aName = [NSString stringWithFormat:@"%s",(char *)sqlite3_column_text(compiledStatement, 1)];
and
NSString *aName = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)];
this. The first one gets data from the table but with wrong encoding. The second one doesn’t give me any result and console shows
*** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘*** ?> [NSString stringWithUTF8String:]: NULL cString’
Where I should search problem and how to work right with encodings?
Try
And sure that you store date by the same method: