Hello!
My project is an exact copy of SQLdb_Tutorial1, described here:
https://wiki.freepascal.org/SQLdb_Tutorial1, attached Test.7z.
I connect to IBM Informix DB via ODBC driver that have following default settings (see ODBC.PNG):
Client Locale=en_US.1252
Database Locale=en_US.819
If the DB field contain string in UTF-8 format (supposedly), then my application produce series of errors (see err1-3.png) and skip the row in DBGrid display (see tables.png, top). The same data can be displayed with WinSQL (see tables.png, bottom).
Playing around, I have set Client Locale=en_US.UTF8 in ODBC driver and this have cleared an exception. Though the string was not displayed correctly (table.png, will attach in next message).
Changing Database Locale in ODBC driver to anything different from en_US.819 (that is English CP) causes informix error "locale mismatch". Likely DB is in English locale while containing some UTF-8 strings.
I have set ODBCConnection1.CharSet=UTF8.
So questions:
1. I hope that there should be means in Lazarus to not produce exception on reading UTF-8 string from DB, even in case of poor ODBC driver settings (as WinSQL do).
2. Any idea how to display UTF-8 string in DBGrid correctly.