[freetds] Status of UTF-8 support in 0.83 dev

Sebastien FLAESCH sf at 4js.com
Tue Aug 12 10:44:42 EDT 2008


Hi all,

I would like to start some tests using ODBC in a UTF-8 environment.

What is the current status of this project?

I found this in the TODO file:

. conversion from ucs2 to utf8, provide for 2+ bytes/character

I have set ClientCharset = UTF8 in the odbc.ini file...

What SQL_* types should I use to bind buffers with SQLBindParameter
or SQLBindCol, when using UTF8 charset?

For example, would this be ok?

     char v_char[41];   /* Can hold up to 10 UTF-8 characters */

     SQLBindParameter(m_hstmt1, 2, SQL_PARAM_INPUT,
                      SQL_C_CHAR,
                      SQL_NVARCHAR, 10, 0, v_char, 0,
                      &v_ind_char);

Assuming that I use a NVARCHAR(10) in the db?

Thanks!
Seb



More information about the FreeTDS mailing list