Hey,
I have an SQLite database with a column that may contain words such as café. At the minute I get the text from the database into an NSString using:
If I then go on to use the NSString, it appears as "cafe?" instead of "café". I don't understand character encodings - is it as simple as using a different method for the NSString, such as stringWithCString:encoding:? What kind of encoding do I need?
Thanks your time,
-Ross
I have an SQLite database with a column that may contain words such as café. At the minute I get the text from the database into an NSString using:
Code:
NSString *text = [NSString stringWithUTF8String:( char * )sqlite3_column_text( statement, 0 )];
If I then go on to use the NSString, it appears as "cafe?" instead of "café". I don't understand character encodings - is it as simple as using a different method for the NSString, such as stringWithCString:encoding:? What kind of encoding do I need?
Thanks your time,
-Ross