Sophie

Sophie

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

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: utf.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>utf.h File Reference</h1>
<p>C API: Code point macros.  
<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="utf8_8h_source.html">unicode/utf8.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="utf16_8h_source.html">unicode/utf16.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="utf__old_8h_source.html">unicode/utf_old.h</a>&quot;</code><br/>

<p><a href="utf_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="utf_8h.html#a807436737b76a72b76ddf0b900304b4a">U_SENTINEL</a>&nbsp;&nbsp;&nbsp;(-1)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This value is intended for sentinel values for APIs that (take or) return single code points (UChar32).  <a href="#a807436737b76a72b76ddf0b900304b4a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#a7d794df2276384e748f2836b25b58f7d">U_IS_UNICODE_NONCHAR</a>(c)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Is this code point a Unicode noncharacter?  <a href="#a7d794df2276384e748f2836b25b58f7d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#acd1d72b6c7a8a90ad13cdf5a4553ca3a">U_IS_UNICODE_CHAR</a>(c)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Is c a Unicode code point value (0..U+10ffff) that can be assigned a character?  <a href="#acd1d72b6c7a8a90ad13cdf5a4553ca3a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#af61a68e47f2001bc1e9eca44b57f16d0">U_IS_BMP</a>(c)&nbsp;&nbsp;&nbsp;((uint32_t)(c)&lt;=0xffff)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Is this code point a BMP code point (U+0000..U+ffff)?  <a href="#af61a68e47f2001bc1e9eca44b57f16d0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#a3e17136e0bf04c8cc2abeea275bde094">U_IS_SUPPLEMENTARY</a>(c)&nbsp;&nbsp;&nbsp;((uint32_t)((c)-0x10000)&lt;=0xfffff)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Is this code point a supplementary code point (U+10000..U+10ffff)?  <a href="#a3e17136e0bf04c8cc2abeea275bde094"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#a8c2a23cf4c14a0c89070319b76e0bc58">U_IS_LEAD</a>(c)&nbsp;&nbsp;&nbsp;(((c)&amp;0xfffffc00)==0xd800)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Is this code point a lead surrogate (U+d800..U+dbff)?  <a href="#a8c2a23cf4c14a0c89070319b76e0bc58"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#ae37493f4f0e5cbec5cdb0e85ba456b65">U_IS_TRAIL</a>(c)&nbsp;&nbsp;&nbsp;(((c)&amp;0xfffffc00)==0xdc00)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Is this code point a trail surrogate (U+dc00..U+dfff)?  <a href="#ae37493f4f0e5cbec5cdb0e85ba456b65"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#a0ec1c520a06d1e8e3ca431a2ff8e6b02">U_IS_SURROGATE</a>(c)&nbsp;&nbsp;&nbsp;(((c)&amp;0xfffff800)==0xd800)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Is this code point a surrogate (U+d800..U+dfff)?  <a href="#a0ec1c520a06d1e8e3ca431a2ff8e6b02"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#ab5f635b25601604c9a5f826fbd87c1aa">U_IS_SURROGATE_LEAD</a>(c)&nbsp;&nbsp;&nbsp;(((c)&amp;0x400)==0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assuming c is a surrogate code point (<a class="el" href="utf_8h.html#a0ec1c520a06d1e8e3ca431a2ff8e6b02" title="Is this code point a surrogate (U+d800..U+dfff)?">U_IS_SURROGATE(c)</a>), is it a lead surrogate?  <a href="#ab5f635b25601604c9a5f826fbd87c1aa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#ace975c9d1f75c650e035539fabc23883">U_IS_SURROGATE_TRAIL</a>(c)&nbsp;&nbsp;&nbsp;(((c)&amp;0x400)!=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assuming c is a surrogate code point (<a class="el" href="utf_8h.html#a0ec1c520a06d1e8e3ca431a2ff8e6b02" title="Is this code point a surrogate (U+d800..U+dfff)?">U_IS_SURROGATE(c)</a>), is it a trail surrogate?  <a href="#ace975c9d1f75c650e035539fabc23883"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>C API: Code point macros. </p>
<p>This file defines macros for checking whether a code point is a surrogate or a non-character etc.</p>
<p>The UChar and UChar32 data types for Unicode code units and code points are defined in umachines.h because they can be machine-dependent.</p>
<p><a class="el" href="utf_8h.html" title="C API: Code point macros.">utf.h</a> is included by <a class="el" href="utypes_8h.html" title="Basic definitions for ICU, for both C and C++ APIs.">utypes.h</a> and itself includes <a class="el" href="utf8_8h.html" title="C API: 8-bit Unicode handling macros.">utf8.h</a> and <a class="el" href="utf16_8h.html" title="C API: 16-bit Unicode handling macros.">utf16.h</a> after some common definitions. Those files define macros for efficiently getting code points in and out of UTF-8/16 strings. <a class="el" href="utf16_8h.html" title="C API: 16-bit Unicode handling macros.">utf16.h</a> macros have "U16_" prefixes. <a class="el" href="utf8_8h.html" title="C API: 8-bit Unicode handling macros.">utf8.h</a> defines similar macros with "U8_" prefixes for UTF-8 string handling.</p>
<p>ICU processes 16-bit Unicode strings. Most of the time, such strings are well-formed UTF-16. Single, unpaired surrogates must be handled as well, and are treated in ICU like regular code points where possible. (Pairs of surrogate code points are indistinguishable from supplementary code points encoded as pairs of supplementary code units.)</p>
<p>In fact, almost all Unicode code points in normal text (&gt;99%) are on the BMP (&lt;=U+ffff) and even &lt;=U+d7ff. ICU functions handle supplementary code points (U+10000..U+10ffff) but are optimized for the much more frequently occurring BMP code points.</p>
<p><a class="el" href="utf_8h.html" title="C API: Code point macros.">utf.h</a> defines UChar to be an unsigned 16-bit integer. If this matches wchar_t, then UChar is defined to be exactly wchar_t, otherwise uint16_t.</p>
<p>UChar32 is defined to be a signed 32-bit integer (int32_t), large enough for a 21-bit Unicode code point (Unicode scalar value, 0..0x10ffff). Before ICU 2.4, the definition of UChar32 was similarly platform-dependent as the definition of UChar. For details see the documentation for UChar32 itself.</p>
<p><a class="el" href="utf_8h.html" title="C API: Code point macros.">utf.h</a> also defines a small number of C macros for single Unicode code points. These are simple checks for surrogates and non-characters. For actual Unicode character properties see <a class="el" href="uchar_8h.html" title="C API: Unicode Properties.">uchar.h</a>.</p>
<p>By default, string operations must be done with error checking in case a string is not well-formed UTF-16. The macros will detect if a surrogate code unit is unpaired (lead unit without trail unit or vice versa) and just return the unit itself as the code point. (It is an accidental property of Unicode and UTF-16 that all malformed sequences can be expressed unambiguously with a distinct subrange of Unicode code points.)</p>
<p>The regular "safe" macros require that the initial, passed-in string index is within bounds. They only check the index when they read more than one code unit. This is usually done with code similar to the following loop: </p>
<pre>while(i&lt;length) {
   <a class="el" href="utf16_8h.html#a844bb48486904fdca40c8b883e9c80ee" title="Get a code point from a string at a code point boundary offset, and advance the offset...">U16_NEXT(s, i, length, c)</a>;
   // use c
 }</pre><p>When it is safe to assume that text is well-formed UTF-16 (does not contain single, unpaired surrogates), then one can use U16_..._UNSAFE macros. These do not check for proper code unit sequences or truncated text and may yield wrong results or even cause a crash if they are used with "malformed" text. In practice, U16_..._UNSAFE macros will produce slightly less code but should not be faster because the processing is only different when a surrogate code unit is detected, which will be rare.</p>
<p>Similarly for UTF-8, there are "safe" macros without a suffix, and U8_..._UNSAFE versions. The performance differences are much larger here because UTF-8 provides so many opportunities for malformed sequences. The unsafe UTF-8 macros are entirely implemented inside the macro definitions and are fast, while the safe UTF-8 macros call functions for all but the trivial (ASCII) cases. (ICU 3.6 optimizes <a class="el" href="utf8_8h.html#a57f3e5429ae4edb27a42367c627aa482" title="Get a code point from a string at a code point boundary offset, and advance the offset...">U8_NEXT()</a> and <a class="el" href="utf8_8h.html#a8a013997e3d13c501ce73bc45e662881" title="Append a code point to a string, overwriting 1 to 4 bytes.">U8_APPEND()</a> to handle most other common characters inline as well.)</p>
<p>Unlike with UTF-16, malformed sequences cannot be expressed with distinct code point values (0..U+10ffff). They are indicated with negative values instead.</p>
<p>For more information see the ICU User Guide Strings chapter (<a href="http://icu-project.org/userguide/strings.html">http://icu-project.org/userguide/strings.html</a>).</p>
<p><em>Usage:</em> ICU coding guidelines for if() statements should be followed when using these macros. Compound statements (curly braces {}) must be used for if-else-while... bodies and all macro statements should be terminated with semicolon.</p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002014">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition in file <a class="el" href="utf_8h_source.html">utf.h</a>.</p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="af61a68e47f2001bc1e9eca44b57f16d0"></a><!-- doxytag: member="utf.h::U_IS_BMP" ref="af61a68e47f2001bc1e9eca44b57f16d0" args="(c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_IS_BMP</td>
          <td>(</td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;((uint32_t)(c)&lt;=0xffff)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Is this code point a BMP code point (U+0000..U+ffff)? </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002018">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

<p>Definition at line <a class="el" href="utf_8h_source.html#l00176">176</a> of file <a class="el" href="utf_8h_source.html">utf.h</a>.</p>

</div>
</div>
<a class="anchor" id="a8c2a23cf4c14a0c89070319b76e0bc58"></a><!-- doxytag: member="utf.h::U_IS_LEAD" ref="a8c2a23cf4c14a0c89070319b76e0bc58" args="(c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_IS_LEAD</td>
          <td>(</td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;(((c)&amp;0xfffffc00)==0xd800)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Is this code point a lead surrogate (U+d800..U+dbff)? </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002020">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf_8h_source.html#l00192">192</a> of file <a class="el" href="utf_8h_source.html">utf.h</a>.</p>

</div>
</div>
<a class="anchor" id="a3e17136e0bf04c8cc2abeea275bde094"></a><!-- doxytag: member="utf.h::U_IS_SUPPLEMENTARY" ref="a3e17136e0bf04c8cc2abeea275bde094" args="(c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_IS_SUPPLEMENTARY</td>
          <td>(</td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;((uint32_t)((c)-0x10000)&lt;=0xfffff)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Is this code point a supplementary code point (U+10000..U+10ffff)? </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002019">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

<p>Definition at line <a class="el" href="utf_8h_source.html#l00184">184</a> of file <a class="el" href="utf_8h_source.html">utf.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0ec1c520a06d1e8e3ca431a2ff8e6b02"></a><!-- doxytag: member="utf.h::U_IS_SURROGATE" ref="a0ec1c520a06d1e8e3ca431a2ff8e6b02" args="(c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_IS_SURROGATE</td>
          <td>(</td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;(((c)&amp;0xfffff800)==0xd800)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Is this code point a surrogate (U+d800..U+dfff)? </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002022">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf_8h_source.html#l00208">208</a> of file <a class="el" href="utf_8h_source.html">utf.h</a>.</p>

</div>
</div>
<a class="anchor" id="ab5f635b25601604c9a5f826fbd87c1aa"></a><!-- doxytag: member="utf.h::U_IS_SURROGATE_LEAD" ref="ab5f635b25601604c9a5f826fbd87c1aa" args="(c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_IS_SURROGATE_LEAD</td>
          <td>(</td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;(((c)&amp;0x400)==0)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Assuming c is a surrogate code point (<a class="el" href="utf_8h.html#a0ec1c520a06d1e8e3ca431a2ff8e6b02" title="Is this code point a surrogate (U+d800..U+dfff)?">U_IS_SURROGATE(c)</a>), is it a lead surrogate? </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002023">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf_8h_source.html#l00217">217</a> of file <a class="el" href="utf_8h_source.html">utf.h</a>.</p>

</div>
</div>
<a class="anchor" id="ace975c9d1f75c650e035539fabc23883"></a><!-- doxytag: member="utf.h::U_IS_SURROGATE_TRAIL" ref="ace975c9d1f75c650e035539fabc23883" args="(c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_IS_SURROGATE_TRAIL</td>
          <td>(</td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;(((c)&amp;0x400)!=0)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Assuming c is a surrogate code point (<a class="el" href="utf_8h.html#a0ec1c520a06d1e8e3ca431a2ff8e6b02" title="Is this code point a surrogate (U+d800..U+dfff)?">U_IS_SURROGATE(c)</a>), is it a trail surrogate? </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000126">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 4.2 </dd></dl>

<p>Definition at line <a class="el" href="utf_8h_source.html#l00226">226</a> of file <a class="el" href="utf_8h_source.html">utf.h</a>.</p>

</div>
</div>
<a class="anchor" id="ae37493f4f0e5cbec5cdb0e85ba456b65"></a><!-- doxytag: member="utf.h::U_IS_TRAIL" ref="ae37493f4f0e5cbec5cdb0e85ba456b65" args="(c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_IS_TRAIL</td>
          <td>(</td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;(((c)&amp;0xfffffc00)==0xdc00)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Is this code point a trail surrogate (U+dc00..U+dfff)? </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002021">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf_8h_source.html#l00200">200</a> of file <a class="el" href="utf_8h_source.html">utf.h</a>.</p>

</div>
</div>
<a class="anchor" id="acd1d72b6c7a8a90ad13cdf5a4553ca3a"></a><!-- doxytag: member="utf.h::U_IS_UNICODE_CHAR" ref="acd1d72b6c7a8a90ad13cdf5a4553ca3a" args="(c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_IS_UNICODE_CHAR</td>
          <td>(</td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">((uint32_t)(c)&lt;0xd800 || \
        ((uint32_t)(c)&gt;0xdfff &amp;&amp; \
         (uint32_t)(c)&lt;=0x10ffff &amp;&amp; \
         !<a class="code" href="utf_8h.html#a7d794df2276384e748f2836b25b58f7d" title="Is this code point a Unicode noncharacter?">U_IS_UNICODE_NONCHAR</a>(c)))
</pre></div>
<p>Is c a Unicode code point value (0..U+10ffff) that can be assigned a character? </p>
<p>Code points that are not characters include:</p>
<ul>
<li>single surrogate code points (U+d800..U+dfff, 2048 code points)</li>
<li>the last two code points on each plane (U+__fffe and U+__ffff, 34 code points)</li>
<li>U+fdd0..U+fdef (new with Unicode 3.1, 32 code points)</li>
<li>the highest Unicode code point value is U+10ffff</li>
</ul>
<p>This means that all code points below U+d800 are character code points, and that boundary is tested first for performance.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002017">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf_8h_source.html#l00164">164</a> of file <a class="el" href="utf_8h_source.html">utf.h</a>.</p>

</div>
</div>
<a class="anchor" id="a7d794df2276384e748f2836b25b58f7d"></a><!-- doxytag: member="utf.h::U_IS_UNICODE_NONCHAR" ref="a7d794df2276384e748f2836b25b58f7d" args="(c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_IS_UNICODE_NONCHAR</td>
          <td>(</td>
          <td class="paramtype">c&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">((c)&gt;=0xfdd0 &amp;&amp; \
     ((uint32_t)(c)&lt;=0xfdef || ((c)&amp;0xfffe)==0xfffe) &amp;&amp; \
     (uint32_t)(c)&lt;=0x10ffff)
</pre></div>
<p>Is this code point a Unicode noncharacter? </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002016">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf_8h_source.html#l00142">142</a> of file <a class="el" href="utf_8h_source.html">utf.h</a>.</p>

</div>
</div>
<a class="anchor" id="a807436737b76a72b76ddf0b900304b4a"></a><!-- doxytag: member="utf.h::U_SENTINEL" ref="a807436737b76a72b76ddf0b900304b4a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_SENTINEL&nbsp;&nbsp;&nbsp;(-1)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This value is intended for sentinel values for APIs that (take or) return single code points (UChar32). </p>
<p>It is outside of the Unicode code point range 0..0x10ffff.</p>
<p>For example, a "done" or "error" value in a new API could be indicated with U_SENTINEL.</p>
<p>ICU APIs designed before ICU 2.4 usually define service-specific "done" values, mostly 0xffff. Those may need to be distinguished from actual U+ffff text contents by calling functions like <a class="el" href="classForwardCharacterIterator.html#ab53c28ee0b9ff659983ded76e53f6251" title="Returns FALSE if there are no more code units or code points at or after the current...">CharacterIterator::hasNext()</a> or <a class="el" href="classReplaceable.html#a81c2af838cfaf3c2a0d46b7fa727e8d0" title="Returns the number of 16-bit code units in the text.">UnicodeString::length()</a>.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>-1 </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809" title="Define UChar32 as a type for single Unicode code points.">UChar32</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002015">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="utf_8h_source.html#l00134">134</a> of file <a class="el" href="utf_8h_source.html">utf.h</a>.</p>

</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>