Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-updates > by-pkgid > 6be1bc83fe66bfd1cc77e80ea06f2bae > files > 1421

icu-doc-53.1-12.3.mga5.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>ICU 53.1: utf.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">ICU 53.1
   &#160;<span id="projectnumber">53.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(12)"><span class="SelectionMark">&#160;</span>Pages</a></div>

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

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_55bf5c6bcedc2c5705af95fc7596ac50.html">icu</a></li><li class="navelem"><a class="el" href="dir_17c4e3d278dd0be6889e0e8c41145d45.html">source</a></li><li class="navelem"><a class="el" href="dir_9d30126de01c6acabed440c3eefed2e6.html">common</a></li><li class="navelem"><a class="el" href="dir_09927d28e4089b088d7b70dcc744d58d.html">unicode</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a>  </div>
  <div class="headertitle">
<div class="title">utf.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>C API: Code point macros.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="umachine_8h_source.html">unicode/umachine.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/>
</div>
<p><a href="utf_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a7d794df2276384e748f2836b25b58f7d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#a7d794df2276384e748f2836b25b58f7d">U_IS_UNICODE_NONCHAR</a>(c)</td></tr>
<tr class="memdesc:a7d794df2276384e748f2836b25b58f7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is this code point a Unicode noncharacter?  <a href="#a7d794df2276384e748f2836b25b58f7d">More...</a><br/></td></tr>
<tr class="separator:a7d794df2276384e748f2836b25b58f7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd1d72b6c7a8a90ad13cdf5a4553ca3a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#acd1d72b6c7a8a90ad13cdf5a4553ca3a">U_IS_UNICODE_CHAR</a>(c)</td></tr>
<tr class="memdesc:acd1d72b6c7a8a90ad13cdf5a4553ca3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is c a Unicode code point value (0..U+10ffff) that can be assigned a character?  <a href="#acd1d72b6c7a8a90ad13cdf5a4553ca3a">More...</a><br/></td></tr>
<tr class="separator:acd1d72b6c7a8a90ad13cdf5a4553ca3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af61a68e47f2001bc1e9eca44b57f16d0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#af61a68e47f2001bc1e9eca44b57f16d0">U_IS_BMP</a>(c)&#160;&#160;&#160;((uint32_t)(c)&lt;=0xffff)</td></tr>
<tr class="memdesc:af61a68e47f2001bc1e9eca44b57f16d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is this code point a BMP code point (U+0000..U+ffff)?  <a href="#af61a68e47f2001bc1e9eca44b57f16d0">More...</a><br/></td></tr>
<tr class="separator:af61a68e47f2001bc1e9eca44b57f16d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e17136e0bf04c8cc2abeea275bde094"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#a3e17136e0bf04c8cc2abeea275bde094">U_IS_SUPPLEMENTARY</a>(c)&#160;&#160;&#160;((uint32_t)((c)-0x10000)&lt;=0xfffff)</td></tr>
<tr class="memdesc:a3e17136e0bf04c8cc2abeea275bde094"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is this code point a supplementary code point (U+10000..U+10ffff)?  <a href="#a3e17136e0bf04c8cc2abeea275bde094">More...</a><br/></td></tr>
<tr class="separator:a3e17136e0bf04c8cc2abeea275bde094"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c2a23cf4c14a0c89070319b76e0bc58"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#a8c2a23cf4c14a0c89070319b76e0bc58">U_IS_LEAD</a>(c)&#160;&#160;&#160;(((c)&amp;0xfffffc00)==0xd800)</td></tr>
<tr class="memdesc:a8c2a23cf4c14a0c89070319b76e0bc58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is this code point a lead surrogate (U+d800..U+dbff)?  <a href="#a8c2a23cf4c14a0c89070319b76e0bc58">More...</a><br/></td></tr>
<tr class="separator:a8c2a23cf4c14a0c89070319b76e0bc58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae37493f4f0e5cbec5cdb0e85ba456b65"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#ae37493f4f0e5cbec5cdb0e85ba456b65">U_IS_TRAIL</a>(c)&#160;&#160;&#160;(((c)&amp;0xfffffc00)==0xdc00)</td></tr>
<tr class="memdesc:ae37493f4f0e5cbec5cdb0e85ba456b65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is this code point a trail surrogate (U+dc00..U+dfff)?  <a href="#ae37493f4f0e5cbec5cdb0e85ba456b65">More...</a><br/></td></tr>
<tr class="separator:ae37493f4f0e5cbec5cdb0e85ba456b65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ec1c520a06d1e8e3ca431a2ff8e6b02"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#a0ec1c520a06d1e8e3ca431a2ff8e6b02">U_IS_SURROGATE</a>(c)&#160;&#160;&#160;(((c)&amp;0xfffff800)==0xd800)</td></tr>
<tr class="memdesc:a0ec1c520a06d1e8e3ca431a2ff8e6b02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is this code point a surrogate (U+d800..U+dfff)?  <a href="#a0ec1c520a06d1e8e3ca431a2ff8e6b02">More...</a><br/></td></tr>
<tr class="separator:a0ec1c520a06d1e8e3ca431a2ff8e6b02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5f635b25601604c9a5f826fbd87c1aa"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#ab5f635b25601604c9a5f826fbd87c1aa">U_IS_SURROGATE_LEAD</a>(c)&#160;&#160;&#160;(((c)&amp;0x400)==0)</td></tr>
<tr class="memdesc:ab5f635b25601604c9a5f826fbd87c1aa"><td class="mdescLeft">&#160;</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">More...</a><br/></td></tr>
<tr class="separator:ab5f635b25601604c9a5f826fbd87c1aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace975c9d1f75c650e035539fabc23883"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utf_8h.html#ace975c9d1f75c650e035539fabc23883">U_IS_SURROGATE_TRAIL</a>(c)&#160;&#160;&#160;(((c)&amp;0x400)!=0)</td></tr>
<tr class="memdesc:ace975c9d1f75c650e035539fabc23883"><td class="mdescLeft">&#160;</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">More...</a><br/></td></tr>
<tr class="separator:ace975c9d1f75c650e035539fabc23883"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>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 <a class="el" href="umachine_8h.html" title="Basic types and constants for UTF. ">umachine.h</a> because they can be machine-dependent.</p>
<p>If U_NO_DEFAULT_INCLUDE_UTF_HEADERS is 0 then <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. If U_NO_DEFAULT_INCLUDE_UTF_HEADERS is 1 then each of these headers must be included explicitly if their definitions are used.</p>
<p><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> 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 mostly 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="umachine_8h.html" title="Basic types and constants for UTF. ">umachine.h</a> defines UChar to be an unsigned 16-bit integer. Where available, UChar is defined to be a char16_t or a wchar_t (if that is an unsigned 16-bit type), 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> 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.</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 to the next co...">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 to the next co...">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://userguide.icu-project.org/strings">http://userguide.icu-project.org/strings</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#_stable002706">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>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="af61a68e47f2001bc1e9eca44b57f16d0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_IS_BMP</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">c</td><td>)</td>
          <td>&#160;&#160;&#160;((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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002709">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

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

</div>
</div>
<a class="anchor" id="a8c2a23cf4c14a0c89070319b76e0bc58"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_IS_LEAD</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">c</td><td>)</td>
          <td>&#160;&#160;&#160;(((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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002711">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

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

</div>
</div>
<a class="anchor" id="a3e17136e0bf04c8cc2abeea275bde094"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_IS_SUPPLEMENTARY</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">c</td><td>)</td>
          <td>&#160;&#160;&#160;((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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002710">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

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

</div>
</div>
<a class="anchor" id="a0ec1c520a06d1e8e3ca431a2ff8e6b02"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_IS_SURROGATE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">c</td><td>)</td>
          <td>&#160;&#160;&#160;(((c)&amp;0xfffff800)==0xd800)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Is this code point a surrogate (U+d800..U+dfff)? </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002713">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

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

</div>
</div>
<a class="anchor" id="ab5f635b25601604c9a5f826fbd87c1aa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_IS_SURROGATE_LEAD</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">c</td><td>)</td>
          <td>&#160;&#160;&#160;(((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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002714">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="ace975c9d1f75c650e035539fabc23883"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_IS_SURROGATE_TRAIL</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">c</td><td>)</td>
          <td>&#160;&#160;&#160;(((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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002715">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

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

</div>
</div>
<a class="anchor" id="ae37493f4f0e5cbec5cdb0e85ba456b65"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_IS_TRAIL</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">c</td><td>)</td>
          <td>&#160;&#160;&#160;(((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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002712">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

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

</div>
</div>
<a class="anchor" id="acd1d72b6c7a8a90ad13cdf5a4553ca3a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_IS_UNICODE_CHAR</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">c</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">((uint32_t)(c)&lt;0xd800 || \</div>
<div class="line">        ((uint32_t)(c)&gt;0xdfff &amp;&amp; \</div>
<div class="line">         (uint32_t)(c)&lt;=0x10ffff &amp;&amp; \</div>
<div class="line">         !<a class="code" href="utf_8h.html#a7d794df2276384e748f2836b25b58f7d">U_IS_UNICODE_NONCHAR</a>(c)))</div>
<div class="ttc" id="utf_8h_html_a7d794df2276384e748f2836b25b58f7d"><div class="ttname"><a href="utf_8h.html#a7d794df2276384e748f2836b25b58f7d">U_IS_UNICODE_NONCHAR</a></div><div class="ttdeci">#define U_IS_UNICODE_NONCHAR(c)</div><div class="ttdoc">Is this code point a Unicode noncharacter? </div><div class="ttdef"><b>Definition:</b> <a href="utf_8h_source.html#l00125">utf.h:125</a></div></div>
</div><!-- fragment -->
<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 class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002708">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

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

</div>
</div>
<a class="anchor" id="a7d794df2276384e748f2836b25b58f7d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_IS_UNICODE_NONCHAR</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">c</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">((c)&gt;=0xfdd0 &amp;&amp; \</div>
<div class="line">     ((uint32_t)(c)&lt;=0xfdef || ((c)&amp;0xfffe)==0xfffe) &amp;&amp; \</div>
<div class="line">     (uint32_t)(c)&lt;=0x10ffff)</div>
</div><!-- fragment -->
<p>Is this code point a Unicode noncharacter? </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>32-bit code point </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE or FALSE </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002707">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

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

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>