Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > f51238514e2abe817779ad2fe01b0759 > files > 718

icu-doc-4.4-2.1mdv2010.2.i586.rpm

<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!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"/>
<title>ICU 4.4: uidna.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.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)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>uidna.h File Reference</h1>
<p>C API: Internationalized Domain Names in Applications Tranformation.  
<a href="#_details">More...</a></p>
<code>#include &quot;<a class="el" href="utypes_8h_source.html">unicode/utypes.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="parseerr_8h_source.html">unicode/parseerr.h</a>&quot;</code><br/>

<p><a href="uidna_8h_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uidna_8h.html#aa50a8a3869d1e1efaec1e719cd921913">UIDNA_DEFAULT</a>&nbsp;&nbsp;&nbsp;0x0000</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Option to prohibit processing of unassigned codepoints in the input and do not check if the input conforms to STD-3 ASCII rules.  <a href="#aa50a8a3869d1e1efaec1e719cd921913"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uidna_8h.html#a0b04ad5e257c52ff65608cd3dce1c21e">UIDNA_ALLOW_UNASSIGNED</a>&nbsp;&nbsp;&nbsp;0x0001</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Option to allow processing of unassigned codepoints in the input.  <a href="#a0b04ad5e257c52ff65608cd3dce1c21e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uidna_8h.html#aa31def36006bdb336c755cc68f34b5db">UIDNA_USE_STD3_RULES</a>&nbsp;&nbsp;&nbsp;0x0002</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Option to check if input conforms to STD-3 ASCII rules.  <a href="#aa31def36006bdb336c755cc68f34b5db"></a><br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uidna_8h.html#aaf3bec2415dd99b4221eeebb723eb082">uidna_toASCII</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *src, int32_t srcLength, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *dest, int32_t destCapacity, int32_t options, <a class="el" href="structUParseError.html">UParseError</a> *parseError, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function implements the ToASCII operation as defined in the IDNA RFC.  <a href="#aaf3bec2415dd99b4221eeebb723eb082"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uidna_8h.html#affc23ca4aea3c6e5150024e5fd5a5b2d">uidna_toUnicode</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *src, int32_t srcLength, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *dest, int32_t destCapacity, int32_t options, <a class="el" href="structUParseError.html">UParseError</a> *parseError, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function implements the ToUnicode operation as defined in the IDNA RFC.  <a href="#affc23ca4aea3c6e5150024e5fd5a5b2d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uidna_8h.html#a711fa1d2e6dd25d7368f5b3ea2aaedc6">uidna_IDNToASCII</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *src, int32_t srcLength, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *dest, int32_t destCapacity, int32_t options, <a class="el" href="structUParseError.html">UParseError</a> *parseError, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function that implements the IDNToASCII operation as defined in the IDNA RFC.  <a href="#a711fa1d2e6dd25d7368f5b3ea2aaedc6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uidna_8h.html#acf38e44019d4eb5a7dd903284fdb18e3">uidna_IDNToUnicode</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *src, int32_t srcLength, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *dest, int32_t destCapacity, int32_t options, <a class="el" href="structUParseError.html">UParseError</a> *parseError, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function that implements the IDNToUnicode operation as defined in the IDNA RFC.  <a href="#acf38e44019d4eb5a7dd903284fdb18e3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uidna_8h.html#a89b089341501d76335772d8b26ffe0db">uidna_compare</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *s1, int32_t length1, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *s2, int32_t length2, int32_t options, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compare two IDN strings for equivalence.  <a href="#a89b089341501d76335772d8b26ffe0db"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>C API: Internationalized Domain Names in Applications Tranformation. </p>
<p>UIDNA API implements the IDNA protocol as defined in the IDNA RFC (<a href="http://www.ietf.org/rfc/rfc3490.txt">http://www.ietf.org/rfc/rfc3490.txt</a>). The RFC defines 2 operations: ToASCII and ToUnicode. Domain labels containing non-ASCII code points are required to be processed by ToASCII operation before passing it to resolver libraries. Domain names that are obtained from resolver libraries are required to be processed by ToUnicode operation before displaying the domain name to the user. IDNA requires that implementations process input strings with Nameprep (<a href="http://www.ietf.org/rfc/rfc3491.txt">http://www.ietf.org/rfc/rfc3491.txt</a>), which is a profile of Stringprep (<a href="http://www.ietf.org/rfc/rfc3454.txt">http://www.ietf.org/rfc/rfc3454.txt</a>), and then with Punycode (<a href="http://www.ietf.org/rfc/rfc3492.txt">http://www.ietf.org/rfc/rfc3492.txt</a>). Implementations of IDNA MUST fully implement Nameprep and Punycode; neither Nameprep nor Punycode are optional. The input and output of ToASCII and ToUnicode operations are Unicode and are designed to be chainable, i.e., applying ToASCII or ToUnicode operations multiple times to an input string will yield the same result as applying the operation once. ToUnicode(ToUnicode(ToUnicode...(ToUnicode(string)))) == ToUnicode(string) ToASCII(ToASCII(ToASCII...(ToASCII(string))) == ToASCII(string). </p>

<p>Definition in file <a class="el" href="uidna_8h_source.html">uidna.h</a>.</p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a0b04ad5e257c52ff65608cd3dce1c21e"></a><!-- doxytag: member="uidna.h::UIDNA_ALLOW_UNASSIGNED" ref="a0b04ad5e257c52ff65608cd3dce1c21e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UIDNA_ALLOW_UNASSIGNED&nbsp;&nbsp;&nbsp;0x0001</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Option to allow processing of unassigned codepoints in the input. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="uidna_8h.html#aaf3bec2415dd99b4221eeebb723eb082" title="This function implements the ToASCII operation as defined in the IDNA RFC.">uidna_toASCII</a> <a class="el" href="uidna_8h.html#affc23ca4aea3c6e5150024e5fd5a5b2d" title="This function implements the ToUnicode operation as defined in the IDNA RFC.">uidna_toUnicode</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001188">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

<p>Definition at line <a class="el" href="uidna_8h_source.html#l00066">66</a> of file <a class="el" href="uidna_8h_source.html">uidna.h</a>.</p>

</div>
</div>
<a class="anchor" id="aa50a8a3869d1e1efaec1e719cd921913"></a><!-- doxytag: member="uidna.h::UIDNA_DEFAULT" ref="aa50a8a3869d1e1efaec1e719cd921913" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UIDNA_DEFAULT&nbsp;&nbsp;&nbsp;0x0000</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Option to prohibit processing of unassigned codepoints in the input and do not check if the input conforms to STD-3 ASCII rules. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="uidna_8h.html#aaf3bec2415dd99b4221eeebb723eb082" title="This function implements the ToASCII operation as defined in the IDNA RFC.">uidna_toASCII</a> <a class="el" href="uidna_8h.html#affc23ca4aea3c6e5150024e5fd5a5b2d" title="This function implements the ToUnicode operation as defined in the IDNA RFC.">uidna_toUnicode</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001187">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

<p>Definition at line <a class="el" href="uidna_8h_source.html#l00059">59</a> of file <a class="el" href="uidna_8h_source.html">uidna.h</a>.</p>

</div>
</div>
<a class="anchor" id="aa31def36006bdb336c755cc68f34b5db"></a><!-- doxytag: member="uidna.h::UIDNA_USE_STD3_RULES" ref="aa31def36006bdb336c755cc68f34b5db" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UIDNA_USE_STD3_RULES&nbsp;&nbsp;&nbsp;0x0002</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Option to check if input conforms to STD-3 ASCII rules. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="uidna_8h.html#aaf3bec2415dd99b4221eeebb723eb082" title="This function implements the ToASCII operation as defined in the IDNA RFC.">uidna_toASCII</a> <a class="el" href="uidna_8h.html#affc23ca4aea3c6e5150024e5fd5a5b2d" title="This function implements the ToUnicode operation as defined in the IDNA RFC.">uidna_toUnicode</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001189">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

<p>Definition at line <a class="el" href="uidna_8h_source.html#l00073">73</a> of file <a class="el" href="uidna_8h_source.html">uidna.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a89b089341501d76335772d8b26ffe0db"></a><!-- doxytag: member="uidna.h::uidna_compare" ref="a89b089341501d76335772d8b26ffe0db" args="(const UChar *s1, int32_t length1, const UChar *s2, int32_t length2, int32_t options, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t uidna_compare </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>s1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>length1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>s2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>length2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>options</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Compare two IDN strings for equivalence. </p>
<p>This function splits the domain names into labels and compares them. According to IDN RFC, whenever two labels are compared, they are considered equal if and only if their ASCII forms (obtained by applying toASCII) match using an case-insensitive ASCII comparison. Two domain names are considered a match if and only if all labels match regardless of whether label separators match.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s1</em>&nbsp;</td><td>First source string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length1</em>&nbsp;</td><td>Length of first source string, or -1 if NUL-terminated.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>s2</em>&nbsp;</td><td>Second source string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length2</em>&nbsp;</td><td>Length of second source string, or -1 if NUL-terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>options</em>&nbsp;</td><td>A bit set of options:</td></tr>
  </table>
  </dd>
</dl>
<ul>
<li>UIDNA_DEFAULT Use default options, i.e., do not process unassigned code points and do not use STD3 ASCII rules If unassigned code points are found the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.</li>
</ul>
<ul>
<li>UIDNA_ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations If this option is set, the unassigned code points are in the input are treated as normal Unicode code points.</li>
</ul>
<ul>
<li>UIDNA_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions If this option is set and the input does not satisfy STD3 rules, the operation will fail with U_IDNA_STD3_ASCII_RULES_ERROR</li>
</ul>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>ICU error code in/out parameter. Must fulfill U_SUCCESS before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>&lt;0 or 0 or &gt;0 as usual for string comparisons </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001194">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a711fa1d2e6dd25d7368f5b3ea2aaedc6"></a><!-- doxytag: member="uidna.h::uidna_IDNToASCII" ref="a711fa1d2e6dd25d7368f5b3ea2aaedc6" args="(const UChar *src, int32_t srcLength, UChar *dest, int32_t destCapacity, int32_t options, UParseError *parseError, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t uidna_IDNToASCII </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>srcLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>destCapacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>options</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUParseError.html">UParseError</a> *&nbsp;</td>
          <td class="paramname"> <em>parseError</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convenience function that implements the IDNToASCII operation as defined in the IDNA RFC. </p>
<p>This operation is done on complete domain names, e.g: "www.example.com". It is important to note that this operation can fail. If it fails, then the input domain name cannot be used as an Internationalized Domain Name and the application should have methods defined to deal with the failure.</p>
<p><b>Note:</b> IDNA RFC specifies that a conformant application should divide a domain name into separate labels, decide whether to apply allowUnassigned and useSTD3ASCIIRules on each, and then convert. This function does not offer that level of granularity. The options once set will apply to all labels in the domain name</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>Input UChar array containing IDN in Unicode. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>srcLength</em>&nbsp;</td><td>Number of UChars in src, or -1 if NUL-terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>Output UChar array with ASCII (ACE encoded) IDN. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>destCapacity</em>&nbsp;</td><td>Size of dest. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>options</em>&nbsp;</td><td>A bit set of options:</td></tr>
  </table>
  </dd>
</dl>
<ul>
<li>UIDNA_DEFAULT Use default options, i.e., do not process unassigned code points and do not use STD3 ASCII rules If unassigned code points are found the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.</li>
</ul>
<ul>
<li>UIDNA_ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations If this option is set, the unassigned code points are in the input are treated as normal Unicode code points.</li>
</ul>
<ul>
<li>UIDNA_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions If this option is set and the input does not satisfy STD3 rules, the operation will fail with U_IDNA_STD3_ASCII_RULES_ERROR</li>
</ul>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>parseError</em>&nbsp;</td><td>Pointer to <a class="el" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors...">UParseError</a> struct to receive information on position of error if an error is encountered. Can be NULL. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>ICU in/out error code parameter. U_INVALID_CHAR_FOUND if src contains unmatched single surrogates. U_INDEX_OUTOFBOUNDS_ERROR if src contains too many code points. U_BUFFER_OVERFLOW_ERROR if destCapacity is not enough </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The length of the result string, if successful - or in case of a buffer overflow, in which case it will be greater than destCapacity. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001192">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div>
<a class="anchor" id="acf38e44019d4eb5a7dd903284fdb18e3"></a><!-- doxytag: member="uidna.h::uidna_IDNToUnicode" ref="acf38e44019d4eb5a7dd903284fdb18e3" args="(const UChar *src, int32_t srcLength, UChar *dest, int32_t destCapacity, int32_t options, UParseError *parseError, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t uidna_IDNToUnicode </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>srcLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>destCapacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>options</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUParseError.html">UParseError</a> *&nbsp;</td>
          <td class="paramname"> <em>parseError</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convenience function that implements the IDNToUnicode operation as defined in the IDNA RFC. </p>
<p>This operation is done on complete domain names, e.g: "www.example.com".</p>
<p><b>Note:</b> IDNA RFC specifies that a conformant application should divide a domain name into separate labels, decide whether to apply allowUnassigned and useSTD3ASCIIRules on each, and then convert. This function does not offer that level of granularity. The options once set will apply to all labels in the domain name</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>Input UChar array containing IDN in ASCII (ACE encoded) form. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>srcLength</em>&nbsp;</td><td>Number of UChars in src, or -1 if NUL-terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>Output UChar array containing Unicode equivalent of source IDN. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>destCapacity</em>&nbsp;</td><td>Size of dest. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>options</em>&nbsp;</td><td>A bit set of options:</td></tr>
  </table>
  </dd>
</dl>
<ul>
<li>UIDNA_DEFAULT Use default options, i.e., do not process unassigned code points and do not use STD3 ASCII rules If unassigned code points are found the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.</li>
</ul>
<ul>
<li>UIDNA_ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations If this option is set, the unassigned code points are in the input are treated as normal Unicode code points.</li>
</ul>
<ul>
<li>UIDNA_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions If this option is set and the input does not satisfy STD3 rules, the operation will fail with U_IDNA_STD3_ASCII_RULES_ERROR</li>
</ul>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>parseError</em>&nbsp;</td><td>Pointer to <a class="el" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors...">UParseError</a> struct to receive information on position of error if an error is encountered. Can be NULL. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>ICU in/out error code parameter. U_INVALID_CHAR_FOUND if src contains unmatched single surrogates. U_INDEX_OUTOFBOUNDS_ERROR if src contains too many code points. U_BUFFER_OVERFLOW_ERROR if destCapacity is not enough </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The length of the result string, if successful - or in case of a buffer overflow, in which case it will be greater than destCapacity. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001193">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div>
<a class="anchor" id="aaf3bec2415dd99b4221eeebb723eb082"></a><!-- doxytag: member="uidna.h::uidna_toASCII" ref="aaf3bec2415dd99b4221eeebb723eb082" args="(const UChar *src, int32_t srcLength, UChar *dest, int32_t destCapacity, int32_t options, UParseError *parseError, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t uidna_toASCII </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>srcLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>destCapacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>options</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUParseError.html">UParseError</a> *&nbsp;</td>
          <td class="paramname"> <em>parseError</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This function implements the ToASCII operation as defined in the IDNA RFC. </p>
<p>This operation is done on <b>single labels</b> before sending it to something that expects ASCII names. A label is an individual part of a domain name. Labels are usually separated by dots; e.g. "www.example.com" is composed of 3 labels "www","example", and "com".</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>Input UChar array containing label in Unicode. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>srcLength</em>&nbsp;</td><td>Number of UChars in src, or -1 if NUL-terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>Output UChar array with ASCII (ACE encoded) label. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>destCapacity</em>&nbsp;</td><td>Size of dest. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>options</em>&nbsp;</td><td>A bit set of options:</td></tr>
  </table>
  </dd>
</dl>
<ul>
<li>UIDNA_DEFAULT Use default options, i.e., do not process unassigned code points and do not use STD3 ASCII rules If unassigned code points are found the operation fails with U_UNASSIGNED_ERROR error code.</li>
</ul>
<ul>
<li>UIDNA_ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations If this option is set, the unassigned code points are in the input are treated as normal Unicode code points.</li>
</ul>
<ul>
<li>UIDNA_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions If this option is set and the input does not satisfy STD3 rules, the operation will fail with U_IDNA_STD3_ASCII_RULES_ERROR</li>
</ul>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>parseError</em>&nbsp;</td><td>Pointer to <a class="el" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors...">UParseError</a> struct to receive information on position of error if an error is encountered. Can be NULL. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>ICU in/out error code parameter. U_INVALID_CHAR_FOUND if src contains unmatched single surrogates. U_INDEX_OUTOFBOUNDS_ERROR if src contains too many code points. U_BUFFER_OVERFLOW_ERROR if destCapacity is not enough </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The length of the result string, if successful - or in case of a buffer overflow, in which case it will be greater than destCapacity. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001190">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div>
<a class="anchor" id="affc23ca4aea3c6e5150024e5fd5a5b2d"></a><!-- doxytag: member="uidna.h::uidna_toUnicode" ref="affc23ca4aea3c6e5150024e5fd5a5b2d" args="(const UChar *src, int32_t srcLength, UChar *dest, int32_t destCapacity, int32_t options, UParseError *parseError, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t uidna_toUnicode </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>srcLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>destCapacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>options</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUParseError.html">UParseError</a> *&nbsp;</td>
          <td class="paramname"> <em>parseError</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This function implements the ToUnicode operation as defined in the IDNA RFC. </p>
<p>This operation is done on <b>single labels</b> before sending it to something that expects Unicode names. A label is an individual part of a domain name. Labels are usually separated by dots; for e.g. "www.example.com" is composed of 3 labels "www","example", and "com".</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>Input UChar array containing ASCII (ACE encoded) label. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>srcLength</em>&nbsp;</td><td>Number of UChars in src, or -1 if NUL-terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>Output Converted UChar array containing Unicode equivalent of label. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>destCapacity</em>&nbsp;</td><td>Size of dest. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>options</em>&nbsp;</td><td>A bit set of options:</td></tr>
  </table>
  </dd>
</dl>
<ul>
<li>UIDNA_DEFAULT Use default options, i.e., do not process unassigned code points and do not use STD3 ASCII rules If unassigned code points are found the operation fails with U_UNASSIGNED_ERROR error code.</li>
</ul>
<ul>
<li>UIDNA_ALLOW_UNASSIGNED Unassigned values can be converted to ASCII for query operations If this option is set, the unassigned code points are in the input are treated as normal Unicode code points. <b> Note: </b> This option is required on toUnicode operation because the RFC mandates verification of decoded ACE input by applying toASCII and comparing its output with source</li>
</ul>
<ul>
<li>UIDNA_USE_STD3_RULES Use STD3 ASCII rules for host name syntax restrictions If this option is set and the input does not satisfy STD3 rules, the operation will fail with U_IDNA_STD3_ASCII_RULES_ERROR</li>
</ul>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>parseError</em>&nbsp;</td><td>Pointer to <a class="el" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors...">UParseError</a> struct to receive information on position of error if an error is encountered. Can be NULL. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>ICU in/out error code parameter. U_INVALID_CHAR_FOUND if src contains unmatched single surrogates. U_INDEX_OUTOFBOUNDS_ERROR if src contains too many code points. U_BUFFER_OVERFLOW_ERROR if destCapacity is not enough </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The length of the result string, if successful - or in case of a buffer overflow, in which case it will be greater than destCapacity. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001191">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div>
</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">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

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

<hr size="1"/><address style="text-align: right;"><small>Generated on 16 Mar 2010 for ICU 4.4 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>