Greg Bryant wrote:
> 
> Not sure if ODBC questions belong here, feel free to point me to a better
> forum.
> 
> I'm using current SQLite (3.7.2) via a visual c++ app.  We're connecting a
> sqlite3 database via ODBC (driver from , also current version - 0.87).  If I
> do either an insert or update using an accented character (e.g. André), it
> works fine, and I can check it using anything that directly connects to the
> database (I've been using SQLiteStudio and SQLiteAdmin) and it looks fine.
> When I go to do a select via the ODBC connection, however, I get back
> garbage for the accented character (specifically, I get AndrÃfÆ?©).
> 
> I don't think the app settings are a problem, since the accent works fine
> through the insert, and step into doesn't get me past the SQLFetch from
> Microsoft's odbc layer, and I don't think it's sqlite, since it appears to
> be correct when viewed through a direct connection, which just leaves the
> odbc layer.  Does anyone have any pointers on where I can look to figure
> this out?

How do you retrieve character data? When using SQL_C_CHAR the 0.87 version
of the driver outputs UTF-8 strings whereas your application deals most
likely with codepage 1251 (Windows Latin-1). When you use SQL_C_WCHAR
everything should be fine. You might also try out a pre-release which has
UTF-8 to/from CP_OEMCP/CP_ACP built into the SQLite3 driver, it is on

 http://www.ch-werner.de/sqliteodbc/sqliteodbc-088pre2.exe

OTOH, I'm not familiar with SQLiteStudio and SQLiteAdmin, do these
insert/update UTF-8 encoded strings?

Regards,
Christian
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to