How to handle special characters from the database in objective c? How to handle special characters from the database in objective c? sqlite sqlite

How to handle special characters from the database in objective c?


This has to do with your character and string encoding.

Right now you have encoding declared in your code as "NSNonLossyASCIIStringEncoding".

The CFString equivalent for the encoding you want is "kCFStringEncodingISOLatin10".

When I look in NSString.h, I see this comment:

/* Note that in addition to the values explicitly listed below, NSStringEncoding supports encodings provided by CFString. See CFStringEncodingExt.h for a list of these encodings. See CFString.h for functions which convert between NSStringEncoding and CFStringEncoding. */

So you just need to convert between CFStringEncoding and NSStringEncoding.