Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > 280da2a01a3d16776505ea3f476de84f > files > 505

icu-doc-3.8.1-2mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>ICU 3.8: utf.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.1 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </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>
<h1>utf.h File Reference</h1>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><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#807436737b76a72b76ddf0b900304b4a">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="#807436737b76a72b76ddf0b900304b4a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#7d794df2276384e748f2836b25b58f7d">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="#7d794df2276384e748f2836b25b58f7d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#cd1d72b6c7a8a90ad13cdf5a4553ca3a">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.  <a href="#cd1d72b6c7a8a90ad13cdf5a4553ca3a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#f61a68e47f2001bc1e9eca44b57f16d0">U_IS_BMP</a>(c)&nbsp;&nbsp;&nbsp;((<a class="el" href="pwin32_8h.html#435d1572bf3f880d55459d9805097f62">uint32_t</a>)(c)&lt;=0xffff)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Is this code point a BMP code point (U+0000.  <a href="#f61a68e47f2001bc1e9eca44b57f16d0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#3e17136e0bf04c8cc2abeea275bde094">U_IS_SUPPLEMENTARY</a>(c)&nbsp;&nbsp;&nbsp;((<a class="el" href="pwin32_8h.html#435d1572bf3f880d55459d9805097f62">uint32_t</a>)((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.  <a href="#3e17136e0bf04c8cc2abeea275bde094"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#8c2a23cf4c14a0c89070319b76e0bc58">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.  <a href="#8c2a23cf4c14a0c89070319b76e0bc58"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#e37493f4f0e5cbec5cdb0e85ba456b65">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.  <a href="#e37493f4f0e5cbec5cdb0e85ba456b65"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#0ec1c520a06d1e8e3ca431a2ff8e6b02">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.  <a href="#0ec1c520a06d1e8e3ca431a2ff8e6b02"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#b5f635b25601604c9a5f826fbd87c1aa">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#0ec1c520a06d1e8e3ca431a2ff8e6b02">U_IS_SURROGATE(c)</a>), is it a lead surrogate?  <a href="#b5f635b25601604c9a5f826fbd87c1aa"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
C API: Code point macros. 
<p>
This file defines macros for checking whether a code point is a surrogate or a non-character etc.<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>
<a class="el" href="utf_8h.html">utf.h</a> is included by <a class="el" href="utypes_8h.html">utypes.h</a> and itself includes <a class="el" href="utf8_8h.html">utf8.h</a> and <a class="el" href="utf16_8h.html">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">utf16.h</a> macros have "U16_" prefixes. <a class="el" href="utf8_8h.html">utf8.h</a> defines similar macros with "U8_" prefixes for UTF-8 string handling.<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>
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>
<a class="el" href="utf_8h.html">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>
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>
<a class="el" href="utf_8h.html">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">uchar.h</a>.<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>
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: <pre>while(i&lt;length) {
   <a class="el" href="utf16_8h.html#844bb48486904fdca40c8b883e9c80ee">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>
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#57f3e5429ae4edb27a42367c627aa482">U8_NEXT()</a> and <a class="el" href="utf8_8h.html#8a013997e3d13c501ce73bc45e662881">U8_APPEND()</a> to handle most other common characters inline as well.)<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>
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>
<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 compact><dt><b><a class="el" href="stable.html#_stable001862">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>.<hr><h2>Define Documentation</h2>
<a class="anchor" name="f61a68e47f2001bc1e9eca44b57f16d0"></a><!-- doxytag: member="utf.h::U_IS_BMP" ref="f61a68e47f2001bc1e9eca44b57f16d0" 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 width="100%">&nbsp;&nbsp;&nbsp;((<a class="el" href="pwin32_8h.html#435d1572bf3f880d55459d9805097f62">uint32_t</a>)(c)&lt;=0xffff)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Is this code point a BMP code point (U+0000. 
<p>
.U+ffff)? <dl compact><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>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001866">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>.
</div>
</div><p>
<a class="anchor" name="8c2a23cf4c14a0c89070319b76e0bc58"></a><!-- doxytag: member="utf.h::U_IS_LEAD" ref="8c2a23cf4c14a0c89070319b76e0bc58" 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 width="100%">&nbsp;&nbsp;&nbsp;(((c)&amp;0xfffffc00)==0xd800)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Is this code point a lead surrogate (U+d800. 
<p>
.U+dbff)? <dl compact><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>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001868">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>.
</div>
</div><p>
<a class="anchor" name="3e17136e0bf04c8cc2abeea275bde094"></a><!-- doxytag: member="utf.h::U_IS_SUPPLEMENTARY" ref="3e17136e0bf04c8cc2abeea275bde094" 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 width="100%">&nbsp;&nbsp;&nbsp;((<a class="el" href="pwin32_8h.html#435d1572bf3f880d55459d9805097f62">uint32_t</a>)((c)-0x10000)&lt;=0xfffff)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Is this code point a supplementary code point (U+10000. 
<p>
.U+10ffff)? <dl compact><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>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001867">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>.
</div>
</div><p>
<a class="anchor" name="0ec1c520a06d1e8e3ca431a2ff8e6b02"></a><!-- doxytag: member="utf.h::U_IS_SURROGATE" ref="0ec1c520a06d1e8e3ca431a2ff8e6b02" 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 width="100%">&nbsp;&nbsp;&nbsp;(((c)&amp;0xfffff800)==0xd800)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Is this code point a surrogate (U+d800. 
<p>
.U+dfff)? <dl compact><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>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001870">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>.
</div>
</div><p>
<a class="anchor" name="b5f635b25601604c9a5f826fbd87c1aa"></a><!-- doxytag: member="utf.h::U_IS_SURROGATE_LEAD" ref="b5f635b25601604c9a5f826fbd87c1aa" 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 width="100%">&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#0ec1c520a06d1e8e3ca431a2ff8e6b02">U_IS_SURROGATE(c)</a>), is it a lead surrogate? 
<p>
<dl compact><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>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001871">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>.
</div>
</div><p>
<a class="anchor" name="e37493f4f0e5cbec5cdb0e85ba456b65"></a><!-- doxytag: member="utf.h::U_IS_TRAIL" ref="e37493f4f0e5cbec5cdb0e85ba456b65" 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 width="100%">&nbsp;&nbsp;&nbsp;(((c)&amp;0xfffffc00)==0xdc00)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Is this code point a trail surrogate (U+dc00. 
<p>
.U+dfff)? <dl compact><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>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001869">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>.
</div>
</div><p>
<a class="anchor" name="cd1d72b6c7a8a90ad13cdf5a4553ca3a"></a><!-- doxytag: member="utf.h::U_IS_UNICODE_CHAR" ref="cd1d72b6c7a8a90ad13cdf5a4553ca3a" 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 width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<b>Value:</b><div class="fragment"><pre class="fragment">((<a class="code" href="platform_8h.html#435d1572bf3f880d55459d9805097f62">uint32_t</a>)(c)&lt;0xd800 || \
        ((<a class="code" href="platform_8h.html#435d1572bf3f880d55459d9805097f62">uint32_t</a>)(c)&gt;0xdfff &amp;&amp; \
         (<a class="code" href="platform_8h.html#435d1572bf3f880d55459d9805097f62">uint32_t</a>)(c)&lt;=0x10ffff &amp;&amp; \
         !<a class="code" href="utf_8h.html#7d794df2276384e748f2836b25b58f7d">U_IS_UNICODE_NONCHAR</a>(c)))
</pre></div>Is c a Unicode code point value (0. 
<p>
.U+10ffff) that can be assigned a character?<p>
Code points that are not characters include:<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 compact><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>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001865">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>.
</div>
</div><p>
<a class="anchor" name="7d794df2276384e748f2836b25b58f7d"></a><!-- doxytag: member="utf.h::U_IS_UNICODE_NONCHAR" ref="7d794df2276384e748f2836b25b58f7d" 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 width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<b>Value:</b><div class="fragment"><pre class="fragment">((c)&gt;=0xfdd0 &amp;&amp; \
     ((<a class="code" href="platform_8h.html#435d1572bf3f880d55459d9805097f62">uint32_t</a>)(c)&lt;=0xfdef || ((c)&amp;0xfffe)==0xfffe) &amp;&amp; \
     (<a class="code" href="platform_8h.html#435d1572bf3f880d55459d9805097f62">uint32_t</a>)(c)&lt;=0x10ffff)
</pre></div>Is this code point a Unicode noncharacter? 
<p>
<dl compact><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>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE or FALSE </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001864">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>.
</div>
</div><p>
<a class="anchor" name="807436737b76a72b76ddf0b900304b4a"></a><!-- doxytag: member="utf.h::U_SENTINEL" ref="807436737b76a72b76ddf0b900304b4a" 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>
It is outside of the Unicode code point range 0..0x10ffff.<p>
For example, a "done" or "error" value in a new API could be indicated with U_SENTINEL.<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#b53c28ee0b9ff659983ded76e53f6251">CharacterIterator::hasNext()</a> or <a class="el" href="classReplaceable.html#6b41489ab29778f61016edb5e89f0b14">UnicodeString::length()</a>.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>-1 </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="umachine_8h.html#09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001863">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>.
</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Fri Sep 14 12:59:32 2007 for ICU 3.8 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
</body>
</html>