Unicode and FreeTDS
Prev | Appendix C. About Unicode, UCS-2, and UTF-8 | Next

## Unicode and FreeTDS

Microsoft servers using TDS 7.0 and above (anything since Microsoft SQL Server 6.5) transmit their data in UTF-16 format (16-bit integers). Because most applications linked to FreeTDS are not prepared to deal with UTF-16 data, FreeTDS can convert the data to something more acceptable, including ASCII. To do so, it employs an iconv library. FreeTDS determines the server's encoding from the TDS protocol and information reported by the server (generally per connection, but in the case of TDS 7.1, per result set column). It discovers the client's encoding in `freetds.conf`. FreeTDS will happily convert and convey your data in any single-byte format that iconv can provide. In practice, this normally means some form of ISO 8859-x or UTF-8.

FreeTDS attempts to convert server character sets to and from client-specified character set, even for single-byte encodings or Sybase servers regardless if the server encoding is Unicode or not.

At some future time, FreeTDS aims to support Unicode and other multi-byte character sets. It does not do so at the current time, beside using wide functions in ODBC.

### For further information

UTF-8 and Unicode FAQ for Unix/Linux, by Markus Kuhn. As the man says, very comprehensive.
ASCII: American Standard Code for Information Infiltration, by Tom Jennings. Everything you ever wanted know about ASCII, but didn't know whom to ask.
A Brief History of Character Codes, by Steven J. Searle. Includes useful references.
Unicode Home Page.

Prev | Up | Next
Unicode Transformation Format: UTF-8 | Home | Appendix D. GNU Free Documentation License