JezK
Edit File: UnicodeFreeTDS.html
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Unicode and FreeTDS</title><link rel="stylesheet" type="text/css" href="userguide.css" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="home" href="index.html" title="FreeTDS User Guide" /><link rel="up" href="AboutUnicode.html" title="Appendix C. About Unicode, UCS-2, and UTF-8" /><link rel="prev" href="UnicodeUtf.html" title="Unicode Transformation Format: UTF-8" /><link rel="next" href="gfdl.html" title="Appendix D. GNU Free Documentation License" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Unicode and <span class="productname">FreeTDS</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="UnicodeUtf.html">Prev</a> </td><th width="60%" align="center">Appendix C. About Unicode, UCS-2, and UTF-8</th><td width="20%" align="right"> <a accesskey="n" href="gfdl.html">Next</a></td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="UnicodeFreeTDS"></a>Unicode and <span class="productname">FreeTDS</span></h2></div></div></div><p>Microsoft servers using TDS 7.0 and above (anything since Microsoft SQL Server 6.5) transmit their data in UCS-2 format (16-bit integers). Because most applications linked to <span class="productname">FreeTDS</span> are not prepared to deal with UCS-2 data, <span class="productname">FreeTDS</span> can convert the data to something more acceptable, including <acronym class="acronym">ASCII</acronym>. To do so, it employs an <span class="productname">iconv</span> library. <span class="productname">FreeTDS</span> 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 <code class="filename">freetds.conf</code>. <span class="productname">FreeTDS</span> will happily convert and convey your data in any <span class="emphasis"><em>single-byte</em></span> format that <span class="productname">iconv</span> can provide. In practice, this normally means some form of ISO 8859-x or UTF-8.</p><p>At some future time, <span class="productname">FreeTDS</span> 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.</p><p>Sybase servers, by the way, adhere to a <span class="quote">“<span class="quote">server makes right</span>”</span> policy: they transmit their data in whatever character set the client requested at login time. The list of available character sets is fairly short, but includes UTF-8. While <span class="productname">FreeTDS</span> <span class="emphasis"><em>could</em></span> convert Sybase data streams as easily as it does Microsoft data streams, to our knowledge no one is doing so. The Sybase server can perform the conversion itself, making <span class="productname">FreeTDS</span>'s capability in this regard largely redundant and irrelevant.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="moreinfo"></a>For further information</h3></div></div></div><table border="0" summary="Simple list" class="simplelist"><tr><td><a class="ulink" href="http://www.cl.cam.ac.uk/~mgk25/unicode.html" target="_top">UTF-8 and Unicode FAQ for Unix/Linux</a>, by Markus Kuhn. As the man says, very comprehensive. </td></tr><tr><td><a class="ulink" href="http://worldpowersystems.com/J/codes/" target="_top">ASCII: American Standard Code for Information Infiltration</a>, by Tom Jennings. Everything you ever wanted know about ASCII, but didn't know whom to ask. </td></tr><tr><td><a class="ulink" href="http://tronweb.super-nova.co.jp/characcodehist.html" target="_top">A Brief History of Character Codes</a>, by Steven J. Searle. Includes useful references. </td></tr><tr><td><a class="ulink" href="http://www.unicode.org/" target="_top">Unicode Home Page</a>. </td></tr></table></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="UnicodeUtf.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="AboutUnicode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gfdl.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Unicode Transformation Format: UTF-8 </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix D. GNU Free Documentation License</td></tr></table></div></body></html>