Log In    |    Knowledge Base    |    4D Home
Tech Tip: Character Sets and 4D ODBC Pro
Published On: May 28, 2009
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

The default Character Set (charset) used by 4D is "UTF-8" if you use SQL LOGIN and Begin SQL/End SQL or 4D SQL native commands. If you write data and you try to read it from 4D ODBC Pro you will probably read bad characters for extended ASCII characters. The solution in this case is to use the command, SQL SET OPTION (SQL Charset; -2) to use the Mac-Roman charset on Mac OS X and ISO-Latin-1 on Windows immediately after calling SQL LOGIN.

Commented by Charlie Vass on June 3, 2009 at 8:13 AM
The UTF-8 encoding is used by default when writing to the external ODBC data sources using "SQL XXX" commands or with Begin/End SQL in the pass-through mode (again, only for ODBC data sources).
Commented by Josh Fletcher on May 28, 2009 at 5:49 PM
The default character set used by 4D v11 SQL is UTF-16, not UTF-8.