Current File : /home/inlingua/public_html/decay_sym/root/usr/local/apps/share/doc/freetds/reference/a00305.html
<!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/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>FreeTDS API: src/replacements/iconv.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">FreeTDS API
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Modules</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_000003.html">src</a></li><li class="navelem"><a class="el" href="dir_000012.html">replacements</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">iconv.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>This file implements a very simple iconv.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;config.h&gt;</code><br />
<code>#include &lt;assert.h&gt;</code><br />
<code>#include &lt;ctype.h&gt;</code><br />
<code>#include &lt;<a class="el" href="a00217_source.html">freetds/tds.h</a>&gt;</code><br />
<code>#include &lt;freetds/bytes.h&gt;</code><br />
<code>#include &lt;freetds/iconv.h&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for iconv.c:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="a00405.svg" width="1455" height="336"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a1050140a3d78b059f809a424e0d9e1c7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1050140a3d78b059f809a424e0d9e1c7"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>CD</b>&#160;&#160;&#160;((int) (TDS_INTPTR) cd)</td></tr>
<tr class="separator:a1050140a3d78b059f809a424e0d9e1c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7baf4c591c023de7af1bf42fb1bef90"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad7baf4c591c023de7af1bf42fb1bef90"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>MASK</b>(n)&#160;&#160;&#160;((0xffffffffu &lt;&lt; (n)) &amp; 0xffffffffu)</td></tr>
<tr class="separator:ad7baf4c591c023de7af1bf42fb1bef90"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:gab57467684a77c6edc27cd98a3079ef43"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gab57467684a77c6edc27cd98a3079ef43"></a>
typedef TDS_UINT&#160;</td><td class="memItemRight" valign="bottom"><b>ICONV_CHAR</b></td></tr>
<tr class="separator:gab57467684a77c6edc27cd98a3079ef43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8ffc7fa0eb2d0a1829ffa1d08af82022"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8ffc7fa0eb2d0a1829ffa1d08af82022"></a>
typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><b>iconv_get_t</b> )(const unsigned char *p, size_t len, ICONV_CHAR *out)</td></tr>
<tr class="separator:ga8ffc7fa0eb2d0a1829ffa1d08af82022"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga30d03a48338dc0409f404df949f63f97"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga30d03a48338dc0409f404df949f63f97"></a>
typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><b>iconv_put_t</b> )(unsigned char *buf, size_t buf_len, ICONV_CHAR c)</td></tr>
<tr class="separator:ga30d03a48338dc0409f404df949f63f97"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gaf640b898b20cd409ef96e48f2fd1c5dd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf640b898b20cd409ef96e48f2fd1c5dd"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>ICONV_CD_VALUE</b> { <b>Like_to_Like</b> = 0x100
 }</td></tr>
<tr class="separator:gaf640b898b20cd409ef96e48f2fd1c5dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga8988a609bb65d45467f6b84f6d82264c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8988a609bb65d45467f6b84f6d82264c"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>get_ascii</b> (const unsigned char *p, size_t len, ICONV_CHAR *out)</td></tr>
<tr class="separator:ga8988a609bb65d45467f6b84f6d82264c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6d46cddd12bfb5b9481f7d5db1154b28"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6d46cddd12bfb5b9481f7d5db1154b28"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>get_err</b> (const unsigned char *p, size_t len, ICONV_CHAR *out)</td></tr>
<tr class="separator:ga6d46cddd12bfb5b9481f7d5db1154b28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0aced3bddfcae66d98d293397cd37ec7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga0aced3bddfcae66d98d293397cd37ec7"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>get_iso1</b> (const unsigned char *p, size_t len, ICONV_CHAR *out)</td></tr>
<tr class="separator:ga0aced3bddfcae66d98d293397cd37ec7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9426e103f1325667962640d59d92ec1c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9426e103f1325667962640d59d92ec1c"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>get_ucs4be</b> (const unsigned char *p, size_t len, ICONV_CHAR *out)</td></tr>
<tr class="separator:ga9426e103f1325667962640d59d92ec1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gade4cd5108b3002c6ad880ee9dc2f62e9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gade4cd5108b3002c6ad880ee9dc2f62e9"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>get_ucs4le</b> (const unsigned char *p, size_t len, ICONV_CHAR *out)</td></tr>
<tr class="separator:gade4cd5108b3002c6ad880ee9dc2f62e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4aa60de8ece655b8d88b3b0bbc1635f9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga4aa60de8ece655b8d88b3b0bbc1635f9"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>get_utf16be</b> (const unsigned char *p, size_t len, ICONV_CHAR *out)</td></tr>
<tr class="separator:ga4aa60de8ece655b8d88b3b0bbc1635f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab8b8471bf9b5cccb6c056b67d4307b7f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gab8b8471bf9b5cccb6c056b67d4307b7f"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>get_utf16le</b> (const unsigned char *p, size_t len, ICONV_CHAR *out)</td></tr>
<tr class="separator:gab8b8471bf9b5cccb6c056b67d4307b7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga26673980abc1bd02ec9021f291d54a78"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga26673980abc1bd02ec9021f291d54a78"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>get_utf8</b> (const unsigned char *p, size_t len, ICONV_CHAR *out)</td></tr>
<tr class="separator:ga26673980abc1bd02ec9021f291d54a78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga05804a8292ddd7f5481436451a4f4a26"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga05804a8292ddd7f5481436451a4f4a26"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>put_ascii</b> (unsigned char *buf, size_t buf_len, ICONV_CHAR c)</td></tr>
<tr class="separator:ga05804a8292ddd7f5481436451a4f4a26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga897a71bda21d63281583b7c40ad7dcd0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga897a71bda21d63281583b7c40ad7dcd0"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>put_err</b> (unsigned char *buf, size_t buf_len, ICONV_CHAR c)</td></tr>
<tr class="separator:ga897a71bda21d63281583b7c40ad7dcd0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac6b9e69bf4a3fc9e8cb8d86e40688138"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac6b9e69bf4a3fc9e8cb8d86e40688138"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>put_iso1</b> (unsigned char *buf, size_t buf_len, ICONV_CHAR c)</td></tr>
<tr class="separator:gac6b9e69bf4a3fc9e8cb8d86e40688138"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac5e1e0c488a8c9fc9e060bef9c62261e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac5e1e0c488a8c9fc9e060bef9c62261e"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>put_ucs4be</b> (unsigned char *buf, size_t buf_len, ICONV_CHAR c)</td></tr>
<tr class="separator:gac5e1e0c488a8c9fc9e060bef9c62261e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac05cbba509163492d6c0835c53cec4ed"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac05cbba509163492d6c0835c53cec4ed"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>put_ucs4le</b> (unsigned char *buf, size_t buf_len, ICONV_CHAR c)</td></tr>
<tr class="separator:gac05cbba509163492d6c0835c53cec4ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaccf9c0f7b71cc687b4e8174e2206242a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaccf9c0f7b71cc687b4e8174e2206242a"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>put_utf16be</b> (unsigned char *buf, size_t buf_len, ICONV_CHAR c)</td></tr>
<tr class="separator:gaccf9c0f7b71cc687b4e8174e2206242a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeb3ff2093c2da0ed54842a5d8d53847b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaeb3ff2093c2da0ed54842a5d8d53847b"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>put_utf16le</b> (unsigned char *buf, size_t buf_len, ICONV_CHAR c)</td></tr>
<tr class="separator:gaeb3ff2093c2da0ed54842a5d8d53847b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga39681befed140ba03251364f014cc6b3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga39681befed140ba03251364f014cc6b3"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>put_utf8</b> (unsigned char *buf, size_t buf_len, ICONV_CHAR c)</td></tr>
<tr class="separator:ga39681befed140ba03251364f014cc6b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6e879e60070a3e43c8f223365bf66137"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6e879e60070a3e43c8f223365bf66137"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><b>tds_sys_iconv</b> (iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)</td></tr>
<tr class="separator:ga6e879e60070a3e43c8f223365bf66137"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae9f9201cc5e009a15e888923575ecc67"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae9f9201cc5e009a15e888923575ecc67"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>tds_sys_iconv_close</b> (iconv_t cd)</td></tr>
<tr class="separator:gae9f9201cc5e009a15e888923575ecc67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga900b0bce08c6bfc2e7c988f4b5970516"><td class="memItemLeft" align="right" valign="top">iconv_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00385.html#ga900b0bce08c6bfc2e7c988f4b5970516">tds_sys_iconv_open</a> (const char *tocode, const char *fromcode)</td></tr>
<tr class="memdesc:ga900b0bce08c6bfc2e7c988f4b5970516"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inputs are FreeTDS canonical names, no other.  <a href="a00385.html#ga900b0bce08c6bfc2e7c988f4b5970516">More...</a><br /></td></tr>
<tr class="separator:ga900b0bce08c6bfc2e7c988f4b5970516"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ga638e76712791b4f8b9faa24f68291d2c"><td class="memItemLeft" align="right" valign="top">static const iconv_get_t&#160;</td><td class="memItemRight" valign="bottom"><b>iconv_gets</b> [8]</td></tr>
<tr class="separator:ga638e76712791b4f8b9faa24f68291d2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacfc3d74648add23b2dd2d5876eed9797"><td class="memItemLeft" align="right" valign="top">static const iconv_put_t&#160;</td><td class="memItemRight" valign="bottom"><b>iconv_puts</b> [8]</td></tr>
<tr class="separator:gacfc3d74648add23b2dd2d5876eed9797"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga833455ee60fba2eff3fd8c157f30fe49"><td class="memItemLeft" align="right" valign="top">static const unsigned char&#160;</td><td class="memItemRight" valign="bottom"><b>utf8_lengths</b> [256]</td></tr>
<tr class="separator:ga833455ee60fba2eff3fd8c157f30fe49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7b89bc425ece776bb10e3bb7a141461c"><td class="memItemLeft" align="right" valign="top">static const unsigned char&#160;</td><td class="memItemRight" valign="bottom"><b>utf8_masks</b> [7]</td></tr>
<tr class="separator:ga7b89bc425ece776bb10e3bb7a141461c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This file implements a very simple iconv. </p>
<p>Its purpose is to allow ASCII clients to communicate with Microsoft servers that encode their metadata in Unicode (UTF-16).</p>
<p>It supports ISO-8859-1, ASCII, UTF-16, UCS-4 and UTF-8 </p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Feb 15 2017 09:01:18 for FreeTDS API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>