SQLite MYSQL character encoding
- by Lee Armstrong
I have a strange situation where the following code works however XCode warns it is deprecated...
NSString *col1 = [NSString stringWithCString:(char *)sqlite3_column_text(compiledStatement, 0)];
However as that is the deprecated method if I set an encoding the string comes out wrong! I have tried all the encodings but none work!
NSString *col1 = [NSString stringWithCString:(char *)sqlite3_column_text(compiledStatement, 0) encoding:NSASCIIStringEncoding];