SQLite MYSQL character encoding
Posted
by
Lee Armstrong
on Stack Overflow
See other posts from Stack Overflow
or by Lee Armstrong
Published on 2011-03-10T09:58:49Z
Indexed on
2011/03/18
8:10 UTC
Read the original article
Hit count: 177
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];
© Stack Overflow or respective owner