German Umlaute and SQLite3?
It seems as if I cannot do WHERE x LIKE y clauses with German Umlaute recognized. Here's a code excerpt:
const char *sql = "SELECT zip, city, number, mobile, active, remarks FROM rawData WHERE city LIKE ?";
if (sqlite3preparev2(database, sql, -1, &searchCityStatement, NULL) != SQLITE_OK) {
NSAssert1(0, @"Error: Failed to prepare statement with message '%s'.", sqlite3_errmsg(database));
}
sqlite3bindtext(searchCityStatement, 1, [c UTF8String], [c length], SQLITE_TRANSIENT);
So the idea here is that I search for rows WHERE city LIKE <parameter c>. It works fine without Umlaute. E.g. rows like Berlin, London, etc. are returned. However, when I search e.g. for Lünen, it does not work. I believe that the [c UTF8String] strips out Umlaute, but just using c does not work, either.
Any help?
iMac, Mac OS X (10.5.4), iPhone 2.0.3