Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-release > by-pkgid > 3a4e91bde08970529a0aa07935652fe8 > files > 1014

icu-doc-58.2-3.mga6.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.11"/>
<title>ICU 58.2: unorm.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="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 id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ICU 58.2
   &#160;<span id="projectnumber">58.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <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>
    </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>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html">source</a></li><li class="navelem"><a class="el" href="dir_30087b5439e04c85304dbcf15650710b.html">common</a></li><li class="navelem"><a class="el" href="dir_8bf9c54ed6ca2fd1e2117fb037e4ad06.html">unicode</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">unorm.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>C API: Unicode Normalization.  
<a href="#details">More...</a></p>
<div class="textblock"><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="uiter_8h_source.html">unicode/uiter.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="unorm2_8h_source.html">unicode/unorm2.h</a>&quot;</code><br />
</div>
<p><a href="unorm_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:a2962ecfc131adbea913c9ac34eaed4b6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="unorm_8h.html#a2962ecfc131adbea913c9ac34eaed4b6">UNORM_COMPARE_NORM_OPTIONS_SHIFT</a>&#160;&#160;&#160;20</td></tr>
<tr class="memdesc:a2962ecfc131adbea913c9ac34eaed4b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lowest-order bit number of <a class="el" href="unorm2_8h.html#a991e0fe6f0d062dd6e8e924517f3f437" title="Compares two strings for canonical equivalence. ">unorm_compare()</a> options bits corresponding to normalization options bits.  <a href="#a2962ecfc131adbea913c9ac34eaed4b6">More...</a><br /></td></tr>
<tr class="separator:a2962ecfc131adbea913c9ac34eaed4b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:af317e3ace13f0ce7c86dd1ca48490ef7"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a> { <br />
&#160;&#160;<a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7a120a05cf3e51beaf4d9fbb6a4a1993c7">UNORM_NONE</a> = 1, 
<a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7a60f3fa3dbcdfc2a075143fe078493e3a">UNORM_NFD</a> = 2, 
<a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7a42f246a2e989929b24b2a4c84fe3a51a">UNORM_NFKD</a> = 3, 
<a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7a5b8bb462684c034d347e8dbcf4b77331">UNORM_NFC</a> = 4, 
<br />
&#160;&#160;<a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7a0f833bde534a6902911c62dbb091a585">UNORM_DEFAULT</a> = UNORM_NFC, 
<a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7a9f7f2ae3788d9aa8e6dff82697d6d0db">UNORM_NFKC</a> =5, 
<a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7aac4a0a6b26928af19d2cef5985bdce8d">UNORM_FCD</a> = 6, 
<a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7ab16cae528525fca531bcdee42b153796">UNORM_MODE_COUNT</a>
<br />
 }<tr class="memdesc:af317e3ace13f0ce7c86dd1ca48490ef7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constants for normalization modes.  <a href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:af317e3ace13f0ce7c86dd1ca48490ef7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16af7b253440dadd46a80a4b9fddba4d"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="unorm_8h.html#a16af7b253440dadd46a80a4b9fddba4da5b4745b8b611e2d7e6245c023e22e462">UNORM_UNICODE_3_2</a> =0x20
 }<tr class="memdesc:a16af7b253440dadd46a80a4b9fddba4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constants for options flags for normalization.  <a href="unorm_8h.html#a16af7b253440dadd46a80a4b9fddba4d">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a16af7b253440dadd46a80a4b9fddba4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a5410fab40c4e60a787c5cfbea5103c75"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="unorm_8h.html#a5410fab40c4e60a787c5cfbea5103c75">unorm_normalize</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *source, int32_t sourceLength, <a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a> mode, int32_t options, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *result, int32_t resultLength, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a5410fab40c4e60a787c5cfbea5103c75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Normalize a string.  <a href="#a5410fab40c4e60a787c5cfbea5103c75">More...</a><br /></td></tr>
<tr class="separator:a5410fab40c4e60a787c5cfbea5103c75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad103c40dd46c7d95f6db4c97aed10277"><td class="memItemLeft" align="right" valign="top"><a class="el" href="unorm2_8h.html#a01b7464189aef5dae63c0c759e84bece">UNormalizationCheckResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="unorm_8h.html#ad103c40dd46c7d95f6db4c97aed10277">unorm_quickCheck</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *source, int32_t sourcelength, <a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a> mode, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:ad103c40dd46c7d95f6db4c97aed10277"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performing quick check on a string, to quickly determine if the string is in a particular normalization format.  <a href="#ad103c40dd46c7d95f6db4c97aed10277">More...</a><br /></td></tr>
<tr class="separator:ad103c40dd46c7d95f6db4c97aed10277"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae437a1459c7379e327799d5d5ea44458"><td class="memItemLeft" align="right" valign="top"><a class="el" href="unorm2_8h.html#a01b7464189aef5dae63c0c759e84bece">UNormalizationCheckResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="unorm_8h.html#ae437a1459c7379e327799d5d5ea44458">unorm_quickCheckWithOptions</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *src, int32_t srcLength, <a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a> mode, int32_t options, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:ae437a1459c7379e327799d5d5ea44458"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performing quick check on a string; same as unorm_quickCheck but takes an extra options parameter like most normalization functions.  <a href="#ae437a1459c7379e327799d5d5ea44458">More...</a><br /></td></tr>
<tr class="separator:ae437a1459c7379e327799d5d5ea44458"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a919fb62224dc5f268e7b1cce21c2e873"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="unorm_8h.html#a919fb62224dc5f268e7b1cce21c2e873">unorm_isNormalized</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *src, int32_t srcLength, <a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a> mode, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:a919fb62224dc5f268e7b1cce21c2e873"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if a string is in a given normalization form.  <a href="#a919fb62224dc5f268e7b1cce21c2e873">More...</a><br /></td></tr>
<tr class="separator:a919fb62224dc5f268e7b1cce21c2e873"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a0e785c85a02052d405626ce301405e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="unorm_8h.html#a0a0e785c85a02052d405626ce301405e">unorm_isNormalizedWithOptions</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *src, int32_t srcLength, <a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a> mode, int32_t options, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:a0a0e785c85a02052d405626ce301405e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if a string is in a given normalization form; same as unorm_isNormalized but takes an extra options parameter like most normalization functions.  <a href="#a0a0e785c85a02052d405626ce301405e">More...</a><br /></td></tr>
<tr class="separator:a0a0e785c85a02052d405626ce301405e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab929eae6735fc93dfd799f7b71553614"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="unorm_8h.html#ab929eae6735fc93dfd799f7b71553614">unorm_next</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> *src, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *dest, int32_t destCapacity, <a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a> mode, int32_t options, <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> doNormalize, <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> *pNeededToNormalize, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:ab929eae6735fc93dfd799f7b71553614"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterative normalization forward.  <a href="#ab929eae6735fc93dfd799f7b71553614">More...</a><br /></td></tr>
<tr class="separator:ab929eae6735fc93dfd799f7b71553614"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b64cb761d9eb7ccfd7ec58a5e045975"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="unorm_8h.html#a1b64cb761d9eb7ccfd7ec58a5e045975">unorm_previous</a> (<a class="el" href="structUCharIterator.html">UCharIterator</a> *src, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *dest, int32_t destCapacity, <a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a> mode, int32_t options, <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> doNormalize, <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> *pNeededToNormalize, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:a1b64cb761d9eb7ccfd7ec58a5e045975"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterative normalization backward.  <a href="#a1b64cb761d9eb7ccfd7ec58a5e045975">More...</a><br /></td></tr>
<tr class="separator:a1b64cb761d9eb7ccfd7ec58a5e045975"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa258530f27604d78c887aac13771e4a1"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="unorm_8h.html#aa258530f27604d78c887aac13771e4a1">unorm_concatenate</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *left, int32_t leftLength, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *right, int32_t rightLength, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *dest, int32_t destCapacity, <a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a> mode, int32_t options, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:aa258530f27604d78c887aac13771e4a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Concatenate normalized strings, making sure that the result is normalized as well.  <a href="#aa258530f27604d78c887aac13771e4a1">More...</a><br /></td></tr>
<tr class="separator:aa258530f27604d78c887aac13771e4a1"><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: Unicode Normalization. </p>
<p>Old Unicode normalization API.</p>
<p>This API has been replaced by the <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> API and is only available for backward compatibility. The functions here simply delegate to the <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> functions, for example <a class="el" href="unorm2_8h.html#aada0d2d95913d0cc3329e9e7fd571630" title="Returns a UNormalizer2 instance which uses the specified data file (packageName/name similar to ucnv_...">unorm2_getInstance()</a> and <a class="el" href="unorm2_8h.html#a0a596802db767da410b4b04cb75cbc53" title="Writes the normalized form of the source string to the destination string (replacing its contents) an...">unorm2_normalize()</a>. There is one exception: The new API does not provide a replacement for <a class="el" href="unorm2_8h.html#a991e0fe6f0d062dd6e8e924517f3f437" title="Compares two strings for canonical equivalence. ">unorm_compare()</a>. Its declaration has been moved to <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a>.</p>
<p><code>unorm_normalize</code> transforms Unicode text into an equivalent composed or decomposed form, allowing for easier sorting and searching of text. <code>unorm_normalize</code> supports the standard normalization forms described in <a href="http://www.unicode.org/unicode/reports/tr15/" target="unicode">Unicode Standard Annex #15: Unicode Normalization Forms</a>.</p>
<p>Characters with accents or other adornments can be encoded in several different ways in Unicode. For example, take the character A-acute. In Unicode, this can be encoded as a single character (the "composed" form):</p>
<div class="fragment"><div class="line">00C1    LATIN CAPITAL LETTER A WITH ACUTE</div></div><!-- fragment --><p>or as two separate characters (the "decomposed" form):</p>
<div class="fragment"><div class="line">0041    LATIN CAPITAL LETTER A</div><div class="line">0301    COMBINING ACUTE ACCENT</div></div><!-- fragment --><p>To a user of your program, however, both of these sequences should be treated as the same "user-level" character "A with acute accent". When you are searching or comparing text, you must ensure that these two sequences are treated equivalently. In addition, you must handle characters with more than one accent. Sometimes the order of a character's combining accents is significant, while in other cases accent sequences in different orders are really equivalent.</p>
<p>Similarly, the string "ffi" can be encoded as three separate letters:</p>
<div class="fragment"><div class="line">0066    LATIN SMALL LETTER F</div><div class="line">0066    LATIN SMALL LETTER F</div><div class="line">0069    LATIN SMALL LETTER I</div></div><!-- fragment --><p>or as the single character</p>
<div class="fragment"><div class="line">FB03    LATIN SMALL LIGATURE FFI</div></div><!-- fragment --><p>The ffi ligature is not a distinct semantic character, and strictly speaking it shouldn't be in Unicode at all, but it was included for compatibility with existing character sets that already provided it. The Unicode standard identifies such characters by giving them "compatibility" decompositions into the corresponding semantic characters. When sorting and searching, you will often want to use these mappings.</p>
<p><code>unorm_normalize</code> helps solve these problems by transforming text into the canonical composed and decomposed forms as shown in the first example above. In addition, you can have it perform compatibility decompositions so that you can treat compatibility characters the same as their equivalents. Finally, <code>unorm_normalize</code> rearranges accents into the proper canonical order, so that you do not have to worry about accent rearrangement on your own.</p>
<p>Form FCD, "Fast C or D", is also designed for collation. It allows to work on strings that are not necessarily normalized with an algorithm (like in collation) that works under "canonical closure", i.e., it treats precomposed characters and their decomposed equivalents the same.</p>
<p>It is not a normalization form because it does not provide for uniqueness of representation. Multiple strings may be canonically equivalent (their NFDs are identical) and may all conform to FCD without being identical themselves.</p>
<p>The form is defined such that the "raw decomposition", the recursive canonical decomposition of each character, results in a string that is canonically ordered. This means that precomposed characters are allowed for as long as their decompositions do not need canonical reordering.</p>
<p>Its advantage for a process like collation is that all NFD and most NFC texts - and many unnormalized texts - already conform to FCD and do not need to be normalized (NFD) for such a process. The FCD quick check will return UNORM_YES for most strings in practice.</p>
<p>unorm_normalize(UNORM_FCD) may be implemented with UNORM_NFD.</p>
<p>For more details on FCD see the collation design document: <a href="http://source.icu-project.org/repos/icu/icuhtml/trunk/design/collation/ICU_collation_design.htm">http://source.icu-project.org/repos/icu/icuhtml/trunk/design/collation/ICU_collation_design.htm</a></p>
<p>ICU collation performs either NFD or FCD normalization automatically if normalization is turned on for the collator object. Beyond collation and string search, normalized strings may be useful for string equivalence comparisons, transliteration/transcription, unique representations, etc.</p>
<p>The W3C generally recommends to exchange texts in NFC. Note also that most legacy character encodings use only precomposed forms and often do not encode any combining marks by themselves. For conversion to such character encodings the Unicode text needs to be normalized to NFC. For more usage examples, see the Unicode Standard Annex. </p>

<p>Definition in file <a class="el" href="unorm_8h_source.html">unorm.h</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a2962ecfc131adbea913c9ac34eaed4b6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UNORM_COMPARE_NORM_OPTIONS_SHIFT&#160;&#160;&#160;20</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Lowest-order bit number of <a class="el" href="unorm2_8h.html#a991e0fe6f0d062dd6e8e924517f3f437" title="Compares two strings for canonical equivalence. ">unorm_compare()</a> options bits corresponding to normalization options bits. </p>
<p>The options parameter for <a class="el" href="unorm2_8h.html#a991e0fe6f0d062dd6e8e924517f3f437" title="Compares two strings for canonical equivalence. ">unorm_compare()</a> uses most bits for itself and for various comparison and folding flags. The most significant bits, however, are shifted down and passed on to the normalization implementation. (That is, from unorm_compare(..., options, ...), options&gt;&gt;UNORM_COMPARE_NORM_OPTIONS_SHIFT will be passed on to the internal normalization functions.)</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="unorm2_8h.html#a991e0fe6f0d062dd6e8e924517f3f437" title="Compares two strings for canonical equivalence. ">unorm_compare</a> </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000095">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>

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

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="a16af7b253440dadd46a80a4b9fddba4d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constants for options flags for normalization. </p>
<p>Use 0 for default options, including normalization according to the Unicode version that is currently supported by ICU (see u_getUnicodeVersion). </p><dl class="deprecated"><dt><b>Deprecated:</b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a16af7b253440dadd46a80a4b9fddba4da5b4745b8b611e2d7e6245c023e22e462"></a>UNORM_UNICODE_3_2&#160;</td><td class="fielddoc">
<p>Options bit set value to select Unicode 3.2 normalization (except NormalizationCorrections). </p>
<p>At most one Unicode version can be selected at a time. </p><dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000112">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>
</td></tr>
</table>

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

</div>
</div>
<a class="anchor" id="af317e3ace13f0ce7c86dd1ca48490ef7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constants for normalization modes. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000093">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="af317e3ace13f0ce7c86dd1ca48490ef7a120a05cf3e51beaf4d9fbb6a4a1993c7"></a>UNORM_NONE&#160;</td><td class="fielddoc">
<p>No decomposition/composition. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000104">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="af317e3ace13f0ce7c86dd1ca48490ef7a60f3fa3dbcdfc2a075143fe078493e3a"></a>UNORM_NFD&#160;</td><td class="fielddoc">
<p>Canonical decomposition. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000105">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="af317e3ace13f0ce7c86dd1ca48490ef7a42f246a2e989929b24b2a4c84fe3a51a"></a>UNORM_NFKD&#160;</td><td class="fielddoc">
<p>Compatibility decomposition. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000106">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="af317e3ace13f0ce7c86dd1ca48490ef7a5b8bb462684c034d347e8dbcf4b77331"></a>UNORM_NFC&#160;</td><td class="fielddoc">
<p>Canonical decomposition followed by canonical composition. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000107">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="af317e3ace13f0ce7c86dd1ca48490ef7a0f833bde534a6902911c62dbb091a585"></a>UNORM_DEFAULT&#160;</td><td class="fielddoc">
<p>Default normalization. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000108">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="af317e3ace13f0ce7c86dd1ca48490ef7a9f7f2ae3788d9aa8e6dff82697d6d0db"></a>UNORM_NFKC&#160;</td><td class="fielddoc">
<p>Compatibility decomposition followed by canonical composition. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000109">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="af317e3ace13f0ce7c86dd1ca48490ef7aac4a0a6b26928af19d2cef5985bdce8d"></a>UNORM_FCD&#160;</td><td class="fielddoc">
<p>"Fast C or D" form. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000110">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="af317e3ace13f0ce7c86dd1ca48490ef7ab16cae528525fca531bcdee42b153796"></a>UNORM_MODE_COUNT&#160;</td><td class="fielddoc">
<p>One more than the highest normalization mode constant. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000111">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>
</td></tr>
</table>

<p>Definition at line <a class="el" href="unorm_8h_source.html#l00138">138</a> of file <a class="el" href="unorm_8h_source.html">unorm.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="aa258530f27604d78c887aac13771e4a1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t unorm_concatenate </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>leftLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>right</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>rightLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>destCapacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a>&#160;</td>
          <td class="paramname"><em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</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> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Concatenate normalized strings, making sure that the result is normalized as well. </p>
<p>If both the left and the right strings are in the normalization form according to "mode/options", then the result will be</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;dest=normalize(left+right, mode, options)</div></div><!-- fragment --><p>With the input strings already being normalized, this function will use <a class="el" href="unorm_8h.html#ab929eae6735fc93dfd799f7b71553614" title="Iterative normalization forward. ">unorm_next()</a> and <a class="el" href="unorm_8h.html#a1b64cb761d9eb7ccfd7ec58a5e045975" title="Iterative normalization backward. ">unorm_previous()</a> to find the adjacent end pieces of the input strings. Only the concatenation of these end pieces will be normalized and then concatenated with the remaining parts of the input strings.</p>
<p>It is allowed to have dest==left to avoid copying the entire left string.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">left</td><td>Left source string, may be same as dest. </td></tr>
    <tr><td class="paramname">leftLength</td><td>Length of left source string, or -1 if NUL-terminated. </td></tr>
    <tr><td class="paramname">right</td><td>Right source string. Must not be the same as dest, nor overlap. </td></tr>
    <tr><td class="paramname">rightLength</td><td>Length of right source string, or -1 if NUL-terminated. </td></tr>
    <tr><td class="paramname">dest</td><td>The output buffer; can be NULL if destCapacity==0 for pure preflighting. </td></tr>
    <tr><td class="paramname">destCapacity</td><td>The number of UChars that fit into dest. </td></tr>
    <tr><td class="paramname">mode</td><td>The normalization mode. </td></tr>
    <tr><td class="paramname">options</td><td>The normalization options, ORed together (0 for no options). </td></tr>
    <tr><td class="paramname">pErrorCode</td><td>ICU error code in/out parameter. Must fulfill U_SUCCESS before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Length of output (number of UChars) when successful or buffer overflow.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="unorm_8h.html#a5410fab40c4e60a787c5cfbea5103c75" title="Normalize a string. ">unorm_normalize</a> </dd>
<dd>
<a class="el" href="unorm_8h.html#ab929eae6735fc93dfd799f7b71553614" title="Iterative normalization forward. ">unorm_next</a> </dd>
<dd>
<a class="el" href="unorm_8h.html#a1b64cb761d9eb7ccfd7ec58a5e045975" title="Iterative normalization backward. ">unorm_previous</a></dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000103">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>

</div>
</div>
<a class="anchor" id="a919fb62224dc5f268e7b1cce21c2e873"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> unorm_isNormalized </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>srcLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a>&#160;</td>
          <td class="paramname"><em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Test if a string is in a given normalization form. </p>
<p>This is semantically equivalent to source.equals(normalize(source, mode)) .</p>
<p>Unlike <a class="el" href="unorm_8h.html#ad103c40dd46c7d95f6db4c97aed10277" title="Performing quick check on a string, to quickly determine if the string is in a particular normalizati...">unorm_quickCheck()</a>, this function returns a definitive result, never a "maybe". For NFD, NFKD, and FCD, both functions work exactly the same. For NFC and NFKC where quickCheck may return "maybe", this function will perform further tests to arrive at a TRUE/FALSE result.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>String that is to be tested if it is in a normalization format. </td></tr>
    <tr><td class="paramname">srcLength</td><td>Length of source to test, or -1 if NUL-terminated. </td></tr>
    <tr><td class="paramname">mode</td><td>Which normalization form to test for. </td></tr>
    <tr><td class="paramname">pErrorCode</td><td>ICU error code in/out parameter. Must fulfill U_SUCCESS before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Boolean value indicating whether the source string is in the "mode" normalization form.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="unorm_8h.html#ad103c40dd46c7d95f6db4c97aed10277" title="Performing quick check on a string, to quickly determine if the string is in a particular normalizati...">unorm_quickCheck</a> </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000099">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>

</div>
</div>
<a class="anchor" id="a0a0e785c85a02052d405626ce301405e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> unorm_isNormalizedWithOptions </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>srcLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a>&#160;</td>
          <td class="paramname"><em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</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> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Test if a string is in a given normalization form; same as unorm_isNormalized but takes an extra options parameter like most normalization functions. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>String that is to be tested if it is in a normalization format. </td></tr>
    <tr><td class="paramname">srcLength</td><td>Length of source to test, or -1 if NUL-terminated. </td></tr>
    <tr><td class="paramname">mode</td><td>Which normalization form to test for. </td></tr>
    <tr><td class="paramname">options</td><td>The normalization options, ORed together (0 for no options). </td></tr>
    <tr><td class="paramname">pErrorCode</td><td>ICU error code in/out parameter. Must fulfill U_SUCCESS before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Boolean value indicating whether the source string is in the "mode/options" normalization form.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="unorm_8h.html#ad103c40dd46c7d95f6db4c97aed10277" title="Performing quick check on a string, to quickly determine if the string is in a particular normalizati...">unorm_quickCheck</a> </dd>
<dd>
<a class="el" href="unorm_8h.html#a919fb62224dc5f268e7b1cce21c2e873" title="Test if a string is in a given normalization form. ">unorm_isNormalized</a> </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000100">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>

</div>
</div>
<a class="anchor" id="ab929eae6735fc93dfd799f7b71553614"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t unorm_next </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUCharIterator.html">UCharIterator</a> *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>destCapacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a>&#160;</td>
          <td class="paramname"><em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>options</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&#160;</td>
          <td class="paramname"><em>doNormalize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> *&#160;</td>
          <td class="paramname"><em>pNeededToNormalize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Iterative normalization forward. </p>
<p>This function (together with unorm_previous) is somewhat similar to the C++ Normalizer class (see its non-static functions).</p>
<p>Iterative normalization is useful when only a small portion of a longer string/text needs to be processed.</p>
<p>For example, the likelihood may be high that processing the first 10% of some text will be sufficient to find certain data. Another example: When one wants to concatenate two normalized strings and get a normalized result, it is much more efficient to normalize just a small part of the result around the concatenation place instead of re-normalizing everything.</p>
<p>The input text is an instance of the C character iteration API <a class="el" href="structUCharIterator.html" title="C API for code unit iteration. ">UCharIterator</a>. It may wrap around a simple string, a CharacterIterator, a Replaceable, or any other kind of text object.</p>
<p>If a buffer overflow occurs, then the caller needs to reset the iterator to the old index and call the function again with a larger buffer - if the caller cares for the actual output. Regardless of the output buffer, the iterator will always be moved to the next normalization boundary.</p>
<p>This function (like unorm_previous) serves two purposes:</p>
<p>1) To find the next boundary so that the normalization of the part of the text from the current position to that boundary does not affect and is not affected by the part of the text beyond that boundary.</p>
<p>2) To normalize the text up to the boundary.</p>
<p>The second step is optional, per the doNormalize parameter. It is omitted for operations like string concatenation, where the two adjacent string ends need to be normalized together. In such a case, the output buffer will just contain a copy of the text up to the boundary.</p>
<p>pNeededToNormalize is an output-only parameter. Its output value is only defined if normalization was requested (doNormalize) and successful (especially, no buffer overflow). It is useful for operations like a normalizing transliterator, where one would not want to replace a piece of text if it is not modified.</p>
<p>If doNormalize==TRUE and pNeededToNormalize!=NULL then *pNeeded... is set TRUE if the normalization was necessary.</p>
<p>If doNormalize==FALSE then *pNeededToNormalize will be set to FALSE.</p>
<p>If the buffer overflows, then *pNeededToNormalize will be undefined; essentially, whenever U_FAILURE is true (like in buffer overflows), this result will be undefined.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The input text in the form of a C character iterator. </td></tr>
    <tr><td class="paramname">dest</td><td>The output buffer; can be NULL if destCapacity==0 for pure preflighting. </td></tr>
    <tr><td class="paramname">destCapacity</td><td>The number of UChars that fit into dest. </td></tr>
    <tr><td class="paramname">mode</td><td>The normalization mode. </td></tr>
    <tr><td class="paramname">options</td><td>The normalization options, ORed together (0 for no options). </td></tr>
    <tr><td class="paramname">doNormalize</td><td>Indicates if the source text up to the next boundary is to be normalized (TRUE) or just copied (FALSE). </td></tr>
    <tr><td class="paramname">pNeededToNormalize</td><td>Output flag indicating if the normalization resulted in different text from the input. Not defined if an error occurs including buffer overflow. Always FALSE if !doNormalize. </td></tr>
    <tr><td class="paramname">pErrorCode</td><td>ICU error code in/out parameter. Must fulfill U_SUCCESS before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Length of output (number of UChars) when successful or buffer overflow.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="unorm_8h.html#a1b64cb761d9eb7ccfd7ec58a5e045975" title="Iterative normalization backward. ">unorm_previous</a> </dd>
<dd>
<a class="el" href="unorm_8h.html#a5410fab40c4e60a787c5cfbea5103c75" title="Normalize a string. ">unorm_normalize</a></dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000101">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>

</div>
</div>
<a class="anchor" id="a5410fab40c4e60a787c5cfbea5103c75"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t unorm_normalize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>sourceLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a>&#160;</td>
          <td class="paramname"><em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>options</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>resultLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Normalize a string. </p>
<p>The string will be normalized according the specified normalization mode and options. The source and result buffers must not be the same, nor overlap.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>The string to normalize. </td></tr>
    <tr><td class="paramname">sourceLength</td><td>The length of source, or -1 if NUL-terminated. </td></tr>
    <tr><td class="paramname">mode</td><td>The normalization mode; one of UNORM_NONE, UNORM_NFD, UNORM_NFC, UNORM_NFKC, UNORM_NFKD, UNORM_DEFAULT. </td></tr>
    <tr><td class="paramname">options</td><td>The normalization options, ORed together (0 for no options). </td></tr>
    <tr><td class="paramname">result</td><td>A pointer to a buffer to receive the result string. The result string is NUL-terminated if possible. </td></tr>
    <tr><td class="paramname">resultLength</td><td>The maximum size of result. </td></tr>
    <tr><td class="paramname">status</td><td>A pointer to a UErrorCode to receive any errors. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The total buffer size needed; if greater than resultLength, the output was truncated, and the error code is set to U_BUFFER_OVERFLOW_ERROR. </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000096">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>

</div>
</div>
<a class="anchor" id="a1b64cb761d9eb7ccfd7ec58a5e045975"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t unorm_previous </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUCharIterator.html">UCharIterator</a> *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>destCapacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a>&#160;</td>
          <td class="paramname"><em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>options</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&#160;</td>
          <td class="paramname"><em>doNormalize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> *&#160;</td>
          <td class="paramname"><em>pNeededToNormalize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Iterative normalization backward. </p>
<p>This function (together with unorm_next) is somewhat similar to the C++ Normalizer class (see its non-static functions). For all details see unorm_next.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The input text in the form of a C character iterator. </td></tr>
    <tr><td class="paramname">dest</td><td>The output buffer; can be NULL if destCapacity==0 for pure preflighting. </td></tr>
    <tr><td class="paramname">destCapacity</td><td>The number of UChars that fit into dest. </td></tr>
    <tr><td class="paramname">mode</td><td>The normalization mode. </td></tr>
    <tr><td class="paramname">options</td><td>The normalization options, ORed together (0 for no options). </td></tr>
    <tr><td class="paramname">doNormalize</td><td>Indicates if the source text up to the next boundary is to be normalized (TRUE) or just copied (FALSE). </td></tr>
    <tr><td class="paramname">pNeededToNormalize</td><td>Output flag indicating if the normalization resulted in different text from the input. Not defined if an error occurs including buffer overflow. Always FALSE if !doNormalize. </td></tr>
    <tr><td class="paramname">pErrorCode</td><td>ICU error code in/out parameter. Must fulfill U_SUCCESS before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Length of output (number of UChars) when successful or buffer overflow.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="unorm_8h.html#ab929eae6735fc93dfd799f7b71553614" title="Iterative normalization forward. ">unorm_next</a> </dd>
<dd>
<a class="el" href="unorm_8h.html#a5410fab40c4e60a787c5cfbea5103c75" title="Normalize a string. ">unorm_normalize</a></dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000102">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>

</div>
</div>
<a class="anchor" id="ad103c40dd46c7d95f6db4c97aed10277"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="unorm2_8h.html#a01b7464189aef5dae63c0c759e84bece">UNormalizationCheckResult</a> unorm_quickCheck </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>sourcelength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a>&#160;</td>
          <td class="paramname"><em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Performing quick check on a string, to quickly determine if the string is in a particular normalization format. </p>
<p>Three types of result can be returned UNORM_YES, UNORM_NO or UNORM_MAYBE. Result UNORM_YES indicates that the argument string is in the desired normalized format, UNORM_NO determines that argument string is not in the desired normalized format. A UNORM_MAYBE result indicates that a more thorough check is required, the user may have to put the string in its normalized form and compare the results.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>string for determining if it is in a normalized format </td></tr>
    <tr><td class="paramname">sourcelength</td><td>length of source to test, or -1 if NUL-terminated </td></tr>
    <tr><td class="paramname">mode</td><td>which normalization form to test for </td></tr>
    <tr><td class="paramname">status</td><td>a pointer to a UErrorCode to receive any errors </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>UNORM_YES, UNORM_NO or UNORM_MAYBE</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="unorm_8h.html#a919fb62224dc5f268e7b1cce21c2e873" title="Test if a string is in a given normalization form. ">unorm_isNormalized</a> </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000097">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>

</div>
</div>
<a class="anchor" id="ae437a1459c7379e327799d5d5ea44458"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="unorm2_8h.html#a01b7464189aef5dae63c0c759e84bece">UNormalizationCheckResult</a> unorm_quickCheckWithOptions </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>srcLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="unorm_8h.html#af317e3ace13f0ce7c86dd1ca48490ef7">UNormalizationMode</a>&#160;</td>
          <td class="paramname"><em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</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> *&#160;</td>
          <td class="paramname"><em>pErrorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Performing quick check on a string; same as unorm_quickCheck but takes an extra options parameter like most normalization functions. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>String that is to be tested if it is in a normalization format. </td></tr>
    <tr><td class="paramname">srcLength</td><td>Length of source to test, or -1 if NUL-terminated. </td></tr>
    <tr><td class="paramname">mode</td><td>Which normalization form to test for. </td></tr>
    <tr><td class="paramname">options</td><td>The normalization options, ORed together (0 for no options). </td></tr>
    <tr><td class="paramname">pErrorCode</td><td>ICU error code in/out parameter. Must fulfill U_SUCCESS before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>UNORM_YES, UNORM_NO or UNORM_MAYBE</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="unorm_8h.html#ad103c40dd46c7d95f6db4c97aed10277" title="Performing quick check on a string, to quickly determine if the string is in a particular normalizati...">unorm_quickCheck</a> </dd>
<dd>
<a class="el" href="unorm_8h.html#a919fb62224dc5f268e7b1cce21c2e873" title="Test if a string is in a given normalization form. ">unorm_isNormalized</a> </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000098">Deprecated:</a></b></dt><dd>ICU 56 Use <a class="el" href="unorm2_8h.html" title="C API: New API for Unicode Normalization. ">unorm2.h</a> instead. </dd></dl>

</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.11
</small></address>
</body>
</html>