Sophie

Sophie

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

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: uspoof.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_3c42bef9a3e7804b3d74ebb2809ebf86.html">i18n</a></li><li class="navelem"><a class="el" href="dir_fa4147b4d9cbc9ae7619e21b25239322.html">unicode</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">uspoof.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Unicode Security and Spoofing Detection, C API.  
<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="uset_8h_source.html">unicode/uset.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="parseerr_8h_source.html">unicode/parseerr.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="localpointer_8h_source.html">unicode/localpointer.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="unistr_8h_source.html">unicode/unistr.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="uniset_8h_source.html">unicode/uniset.h</a>&quot;</code><br />
</div>
<p><a href="uspoof_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="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespaceicu"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceicu.html">icu</a></td></tr>
<tr class="memdesc:namespaceicu"><td class="mdescLeft">&#160;</td><td class="mdescRight">File <a class="el" href="coll_8h.html" title="C++ API: Collation Service. ">coll.h</a>. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ad5e4927218c9e62595a67378cf6e371f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad5e4927218c9e62595a67378cf6e371f"></a>
typedef struct <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a></td></tr>
<tr class="memdesc:ad5e4927218c9e62595a67378cf6e371f"><td class="mdescLeft">&#160;</td><td class="mdescRight">typedef for C of USpoofChecker <br /></td></tr>
<tr class="separator:ad5e4927218c9e62595a67378cf6e371f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4d0a57ce124af1f838739437aae20f9"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a></td></tr>
<tr class="separator:ab4d0a57ce124af1f838739437aae20f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f7748f370e9cc7f0c9a84eaa6165ddc"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155">USpoofChecks</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a3f7748f370e9cc7f0c9a84eaa6165ddc">USpoofChecks</a></td></tr>
<tr class="memdesc:a3f7748f370e9cc7f0c9a84eaa6165ddc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enum for the kinds of checks that USpoofChecker can perform.  <a href="#a3f7748f370e9cc7f0c9a84eaa6165ddc">More...</a><br /></td></tr>
<tr class="separator:a3f7748f370e9cc7f0c9a84eaa6165ddc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac129ea51214fb8cd249bb07500c1c2fc"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852">URestrictionLevel</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#ac129ea51214fb8cd249bb07500c1c2fc">URestrictionLevel</a></td></tr>
<tr class="memdesc:ac129ea51214fb8cd249bb07500c1c2fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constants from UAX #39 for use in <a class="el" href="uspoof_8h.html#aa15e811b7f72face34a24012a02a945e">uspoof_setRestrictionLevel</a>, and for returned identifier restriction levels in check results.  <a href="#ac129ea51214fb8cd249bb07500c1c2fc">More...</a><br /></td></tr>
<tr class="separator:ac129ea51214fb8cd249bb07500c1c2fc"><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:a0dbd60e53a571689baf65c63f4de8155"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155">USpoofChecks</a> { <br />
&#160;&#160;<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155adc4588fd7ff74c3a6e5cc91d3a6f5d60">USPOOF_SINGLE_SCRIPT_CONFUSABLE</a> = 1, 
<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a76a60327ab14a68342242aae60340106">USPOOF_MIXED_SCRIPT_CONFUSABLE</a> = 2, 
<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155abfc834ae8c881e54a7922648d5fecead">USPOOF_WHOLE_SCRIPT_CONFUSABLE</a> = 4, 
<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a42d6035a2e66bfcf39b0e838168afdba">USPOOF_CONFUSABLE</a> = USPOOF_SINGLE_SCRIPT_CONFUSABLE | USPOOF_MIXED_SCRIPT_CONFUSABLE | USPOOF_WHOLE_SCRIPT_CONFUSABLE, 
<br />
&#160;&#160;<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155ae65a72b384e76f7ac1cc4df1decd8057">USPOOF_ANY_CASE</a> = 8, 
<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a1977848d7ccac6f3640fa684b452f69a">USPOOF_RESTRICTION_LEVEL</a> = 16, 
<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a68b7d294c1566c1f4a74e2b3a952a138">USPOOF_SINGLE_SCRIPT</a> = USPOOF_RESTRICTION_LEVEL, 
<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a7324a51073ca18279da8706d8c21ee0c">USPOOF_INVISIBLE</a> = 32, 
<br />
&#160;&#160;<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a3f3e13d5b54cc156864a2aca221b3888">USPOOF_CHAR_LIMIT</a> = 64, 
<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a0fbfe4596de0672faf4f0d4f01a823f6">USPOOF_MIXED_NUMBERS</a> = 128, 
<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a4450adc366e2178c451d89b2ea244123">USPOOF_ALL_CHECKS</a> = 0xFFFF, 
<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155aa7307e5bdc933ceba391fbbc22b382ab">USPOOF_AUX_INFO</a> = 0x40000000
<br />
 }<tr class="memdesc:a0dbd60e53a571689baf65c63f4de8155"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enum for the kinds of checks that USpoofChecker can perform.  <a href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a0dbd60e53a571689baf65c63f4de8155"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a566eea7ea15156355085eb7ff5013852"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852">URestrictionLevel</a> { <br />
&#160;&#160;<a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852a262982208b89a2649d0f31ea48e46765">USPOOF_ASCII</a> = 0x10000000, 
<a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852a0488c3736f11d8808ac55f72a3c6bde2">USPOOF_SINGLE_SCRIPT_RESTRICTIVE</a> = 0x20000000, 
<a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852af6dda9229dc422d3e8e41a23a1251060">USPOOF_HIGHLY_RESTRICTIVE</a> = 0x30000000, 
<a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852a06d4bf8b1c05dca9a9ec69a0e926e117">USPOOF_MODERATELY_RESTRICTIVE</a> = 0x40000000, 
<br />
&#160;&#160;<a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852af1e2132b4067af2aec3460c679f7e598">USPOOF_MINIMALLY_RESTRICTIVE</a> = 0x50000000, 
<a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852af8c3d86392c0d18d51b05390483a036e">USPOOF_UNRESTRICTIVE</a> = 0x60000000, 
<a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852a900ac32a2451a70f42c424445f0f3b6f">USPOOF_RESTRICTION_LEVEL_MASK</a> = 0x7F000000, 
<a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852a3744a1ffbcb1b9c30f484034d0843025">USPOOF_UNDEFINED_RESTRICTIVE</a> = -1
<br />
 }<tr class="memdesc:a566eea7ea15156355085eb7ff5013852"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constants from UAX #39 for use in <a class="el" href="uspoof_8h.html#aa15e811b7f72face34a24012a02a945e">uspoof_setRestrictionLevel</a>, and for returned identifier restriction levels in check results.  <a href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a566eea7ea15156355085eb7ff5013852"><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:afeff54ce632c1357e914334009becb62"><td class="memItemLeft" align="right" valign="top"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#afeff54ce632c1357e914334009becb62">uspoof_open</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:afeff54ce632c1357e914334009becb62"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a Unicode Spoof Checker, configured to perform all checks except for USPOOF_LOCALE_LIMIT and USPOOF_CHAR_LIMIT.  <a href="#afeff54ce632c1357e914334009becb62">More...</a><br /></td></tr>
<tr class="separator:afeff54ce632c1357e914334009becb62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa13a3dd9f673f9df317948eecab1a346"><td class="memItemLeft" align="right" valign="top"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#aa13a3dd9f673f9df317948eecab1a346">uspoof_openFromSerialized</a> (const void *data, int32_t length, int32_t *pActualLength, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *pErrorCode)</td></tr>
<tr class="memdesc:aa13a3dd9f673f9df317948eecab1a346"><td class="mdescLeft">&#160;</td><td class="mdescRight">Open a Spoof checker from its serialized form, stored in 32-bit-aligned memory.  <a href="#aa13a3dd9f673f9df317948eecab1a346">More...</a><br /></td></tr>
<tr class="separator:aa13a3dd9f673f9df317948eecab1a346"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5332f41a9d13aec2cc115e6a24d08595"><td class="memItemLeft" align="right" valign="top"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a5332f41a9d13aec2cc115e6a24d08595">uspoof_openFromSource</a> (const char *confusables, int32_t confusablesLen, const char *confusablesWholeScript, int32_t confusablesWholeScriptLen, int32_t *errType, <a class="el" href="structUParseError.html">UParseError</a> *pe, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a5332f41a9d13aec2cc115e6a24d08595"><td class="mdescLeft">&#160;</td><td class="mdescRight">Open a Spoof Checker from the source form of the spoof data.  <a href="#a5332f41a9d13aec2cc115e6a24d08595">More...</a><br /></td></tr>
<tr class="separator:a5332f41a9d13aec2cc115e6a24d08595"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab63b4f7780b1d6c57a31624ad5c3db41"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#ab63b4f7780b1d6c57a31624ad5c3db41">uspoof_close</a> (<a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc)</td></tr>
<tr class="memdesc:ab63b4f7780b1d6c57a31624ad5c3db41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close a Spoof Checker, freeing any memory that was being held by its implementation.  <a href="#ab63b4f7780b1d6c57a31624ad5c3db41">More...</a><br /></td></tr>
<tr class="separator:ab63b4f7780b1d6c57a31624ad5c3db41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a6a3fff21c2aa515d3e16da47609a48"><td class="memItemLeft" align="right" valign="top"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a5a6a3fff21c2aa515d3e16da47609a48">uspoof_clone</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a5a6a3fff21c2aa515d3e16da47609a48"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clone a Spoof Checker.  <a href="#a5a6a3fff21c2aa515d3e16da47609a48">More...</a><br /></td></tr>
<tr class="separator:a5a6a3fff21c2aa515d3e16da47609a48"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d28ac52f3daa1317d3f3a6ee1324dab"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> void U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab">uspoof_setChecks</a> (<a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, int32_t checks, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a0d28ac52f3daa1317d3f3a6ee1324dab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify the bitmask of checks that will be performed by <a class="el" href="uspoof_8h.html#a21bb11dd91519e5033d43036a30e4d67">uspoof_check</a>.  <a href="#a0d28ac52f3daa1317d3f3a6ee1324dab">More...</a><br /></td></tr>
<tr class="separator:a0d28ac52f3daa1317d3f3a6ee1324dab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1a26eb3a73953e1fea08af8270f5252"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#ae1a26eb3a73953e1fea08af8270f5252">uspoof_getChecks</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:ae1a26eb3a73953e1fea08af8270f5252"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the set of checks that this Spoof Checker has been configured to perform.  <a href="#ae1a26eb3a73953e1fea08af8270f5252">More...</a><br /></td></tr>
<tr class="separator:ae1a26eb3a73953e1fea08af8270f5252"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa15e811b7f72face34a24012a02a945e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> void U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#aa15e811b7f72face34a24012a02a945e">uspoof_setRestrictionLevel</a> (<a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, <a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852">URestrictionLevel</a> restrictionLevel)</td></tr>
<tr class="memdesc:aa15e811b7f72face34a24012a02a945e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the loosest restriction level allowed for strings.  <a href="#aa15e811b7f72face34a24012a02a945e">More...</a><br /></td></tr>
<tr class="separator:aa15e811b7f72face34a24012a02a945e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a7ef2dca2d8d13cbedbda6d0a975cf3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> <a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852">URestrictionLevel</a> U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a2a7ef2dca2d8d13cbedbda6d0a975cf3">uspoof_getRestrictionLevel</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc)</td></tr>
<tr class="memdesc:a2a7ef2dca2d8d13cbedbda6d0a975cf3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the Restriction Level that will be tested if the checks include <a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a1977848d7ccac6f3640fa684b452f69a">USPOOF_RESTRICTION_LEVEL</a>.  <a href="#a2a7ef2dca2d8d13cbedbda6d0a975cf3">More...</a><br /></td></tr>
<tr class="separator:a2a7ef2dca2d8d13cbedbda6d0a975cf3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51e28e636fbb5707f66ef4d4caff5de0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> void U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a51e28e636fbb5707f66ef4d4caff5de0">uspoof_setAllowedLocales</a> (<a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, const char *localesList, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a51e28e636fbb5707f66ef4d4caff5de0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Limit characters that are acceptable in identifiers being checked to those normally used with the languages associated with the specified locales.  <a href="#a51e28e636fbb5707f66ef4d4caff5de0">More...</a><br /></td></tr>
<tr class="separator:a51e28e636fbb5707f66ef4d4caff5de0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94abb819283a77089262185711d855e9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> const char *U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a94abb819283a77089262185711d855e9">uspoof_getAllowedLocales</a> (<a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a94abb819283a77089262185711d855e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a list of locales for the scripts that are acceptable in strings to be checked.  <a href="#a94abb819283a77089262185711d855e9">More...</a><br /></td></tr>
<tr class="separator:a94abb819283a77089262185711d855e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39e66376b958996302cd4a53b16c0548"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> void U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a39e66376b958996302cd4a53b16c0548">uspoof_setAllowedChars</a> (<a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, const <a class="el" href="ucnv_8h.html#adce3fef7c15d7c78196bf977ac96ec9c">USet</a> *chars, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a39e66376b958996302cd4a53b16c0548"><td class="mdescLeft">&#160;</td><td class="mdescRight">Limit the acceptable characters to those specified by a Unicode Set.  <a href="#a39e66376b958996302cd4a53b16c0548">More...</a><br /></td></tr>
<tr class="separator:a39e66376b958996302cd4a53b16c0548"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afcb9c0b2ba947138032ab2ee53004485"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> const <a class="el" href="ucnv_8h.html#adce3fef7c15d7c78196bf977ac96ec9c">USet</a> *U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#afcb9c0b2ba947138032ab2ee53004485">uspoof_getAllowedChars</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:afcb9c0b2ba947138032ab2ee53004485"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a USet for the characters permitted in an identifier.  <a href="#afcb9c0b2ba947138032ab2ee53004485">More...</a><br /></td></tr>
<tr class="separator:afcb9c0b2ba947138032ab2ee53004485"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41c7478556f4004eccea6fb3feca0bdb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> void U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a41c7478556f4004eccea6fb3feca0bdb">uspoof_setAllowedUnicodeSet</a> (<a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, const <a class="el" href="classicu_1_1UnicodeSet.html">icu::UnicodeSet</a> *chars, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a41c7478556f4004eccea6fb3feca0bdb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Limit the acceptable characters to those specified by a Unicode Set.  <a href="#a41c7478556f4004eccea6fb3feca0bdb">More...</a><br /></td></tr>
<tr class="separator:a41c7478556f4004eccea6fb3feca0bdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a5b3dff0328db93ac6494f8de2a612b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> const <a class="el" href="classicu_1_1UnicodeSet.html">icu::UnicodeSet</a> *U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a5a5b3dff0328db93ac6494f8de2a612b">uspoof_getAllowedUnicodeSet</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a5a5b3dff0328db93ac6494f8de2a612b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a UnicodeSet for the characters permitted in an identifier.  <a href="#a5a5b3dff0328db93ac6494f8de2a612b">More...</a><br /></td></tr>
<tr class="separator:a5a5b3dff0328db93ac6494f8de2a612b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21bb11dd91519e5033d43036a30e4d67"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a21bb11dd91519e5033d43036a30e4d67">uspoof_check</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *id, int32_t length, int32_t *position, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a21bb11dd91519e5033d43036a30e4d67"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check the specified string for possible security issues.  <a href="#a21bb11dd91519e5033d43036a30e4d67">More...</a><br /></td></tr>
<tr class="separator:a21bb11dd91519e5033d43036a30e4d67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14443b1ccec5e500b1ce0c0b259b313a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a14443b1ccec5e500b1ce0c0b259b313a">uspoof_checkUTF8</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, const char *id, int32_t length, int32_t *position, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a14443b1ccec5e500b1ce0c0b259b313a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check the specified string for possible security issues.  <a href="#a14443b1ccec5e500b1ce0c0b259b313a">More...</a><br /></td></tr>
<tr class="separator:a14443b1ccec5e500b1ce0c0b259b313a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae165c7f55213376cda5274045a4cd888"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#ae165c7f55213376cda5274045a4cd888">uspoof_checkUnicodeString</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, const <a class="el" href="classicu_1_1UnicodeString.html">icu::UnicodeString</a> &amp;id, int32_t *position, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:ae165c7f55213376cda5274045a4cd888"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check the specified string for possible security issues.  <a href="#ae165c7f55213376cda5274045a4cd888">More...</a><br /></td></tr>
<tr class="separator:ae165c7f55213376cda5274045a4cd888"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae24189f414f6c0c5dad07a8afe840107"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a41691e68155dca13bc1f020fa30dac82">U_DRAFT</a> int32_t U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#ae24189f414f6c0c5dad07a8afe840107">uspoof_check2</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *id, int32_t length, <a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a> *checkResult, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:ae24189f414f6c0c5dad07a8afe840107"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check the specified string for possible security issues.  <a href="#ae24189f414f6c0c5dad07a8afe840107">More...</a><br /></td></tr>
<tr class="separator:ae24189f414f6c0c5dad07a8afe840107"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a269cf650aa53dd842a6d5c82b3ae2c65"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a41691e68155dca13bc1f020fa30dac82">U_DRAFT</a> int32_t U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a269cf650aa53dd842a6d5c82b3ae2c65">uspoof_check2UTF8</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, const char *id, int32_t length, <a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a> *checkResult, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a269cf650aa53dd842a6d5c82b3ae2c65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check the specified string for possible security issues.  <a href="#a269cf650aa53dd842a6d5c82b3ae2c65">More...</a><br /></td></tr>
<tr class="separator:a269cf650aa53dd842a6d5c82b3ae2c65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d6637ca53487880711d714e1181ca7c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a41691e68155dca13bc1f020fa30dac82">U_DRAFT</a> int32_t U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a8d6637ca53487880711d714e1181ca7c">uspoof_check2UnicodeString</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, const <a class="el" href="classicu_1_1UnicodeString.html">icu::UnicodeString</a> &amp;id, <a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a> *checkResult, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a8d6637ca53487880711d714e1181ca7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check the specified string for possible security issues.  <a href="#a8d6637ca53487880711d714e1181ca7c">More...</a><br /></td></tr>
<tr class="separator:a8d6637ca53487880711d714e1181ca7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af815a3ac7c924bc79058029445069fda"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a41691e68155dca13bc1f020fa30dac82">U_DRAFT</a> <a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a> *U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#af815a3ac7c924bc79058029445069fda">uspoof_openCheckResult</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:af815a3ac7c924bc79058029445069fda"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a USpoofCheckResult, used by the <a class="el" href="uspoof_8h.html#ae24189f414f6c0c5dad07a8afe840107">uspoof_check2</a> class of functions to return information about the identifier.  <a href="#af815a3ac7c924bc79058029445069fda">More...</a><br /></td></tr>
<tr class="separator:af815a3ac7c924bc79058029445069fda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea80fdd47684dca9a6c9378e981e17c9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a41691e68155dca13bc1f020fa30dac82">U_DRAFT</a> void U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#aea80fdd47684dca9a6c9378e981e17c9">uspoof_closeCheckResult</a> (<a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a> *checkResult)</td></tr>
<tr class="memdesc:aea80fdd47684dca9a6c9378e981e17c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close a USpoofCheckResult, freeing any memory that was being held by its implementation.  <a href="#aea80fdd47684dca9a6c9378e981e17c9">More...</a><br /></td></tr>
<tr class="separator:aea80fdd47684dca9a6c9378e981e17c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d534a6009698bc188e3b92c27a03a32"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2d534a6009698bc188e3b92c27a03a32"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>U_DEFINE_LOCAL_OPEN_POINTER</b> (<a class="el" href="classLocalUSpoofCheckResultPointer.html">LocalUSpoofCheckResultPointer</a>, <a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a>, <a class="el" href="uspoof_8h.html#aea80fdd47684dca9a6c9378e981e17c9">uspoof_closeCheckResult</a>)</td></tr>
<tr class="separator:a2d534a6009698bc188e3b92c27a03a32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a109dc9f022e1c9a8044684c553ce9b66"><td class="memItemLeft" align="right" valign="top"><a class="el" href="uversion_8h.html#a3da1f00f3b02976ac53c014a3e4c0933">U_NAMESPACE_END</a> <a class="el" href="umachine_8h.html#a41691e68155dca13bc1f020fa30dac82">U_DRAFT</a> int32_t U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a109dc9f022e1c9a8044684c553ce9b66">uspoof_getCheckResultChecks</a> (const <a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a> *checkResult, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a109dc9f022e1c9a8044684c553ce9b66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicates which of the spoof check(s) have failed.  <a href="#a109dc9f022e1c9a8044684c553ce9b66">More...</a><br /></td></tr>
<tr class="separator:a109dc9f022e1c9a8044684c553ce9b66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1350f398faf02177b323bf21a8ffa1e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a41691e68155dca13bc1f020fa30dac82">U_DRAFT</a> <a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852">URestrictionLevel</a> U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#ac1350f398faf02177b323bf21a8ffa1e">uspoof_getCheckResultRestrictionLevel</a> (const <a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a> *checkResult, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:ac1350f398faf02177b323bf21a8ffa1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the restriction level that the text meets, if the USPOOF_RESTRICTION_LEVEL check was enabled; otherwise, undefined.  <a href="#ac1350f398faf02177b323bf21a8ffa1e">More...</a><br /></td></tr>
<tr class="separator:ac1350f398faf02177b323bf21a8ffa1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e02e6cff6f2f878a10f047a2a58186b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a41691e68155dca13bc1f020fa30dac82">U_DRAFT</a> const <a class="el" href="ucnv_8h.html#adce3fef7c15d7c78196bf977ac96ec9c">USet</a> *U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a9e02e6cff6f2f878a10f047a2a58186b">uspoof_getCheckResultNumerics</a> (const <a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a> *checkResult, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a9e02e6cff6f2f878a10f047a2a58186b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the set of numerics found in the string, if the USPOOF_MIXED_NUMBERS check was enabled; otherwise, undefined.  <a href="#a9e02e6cff6f2f878a10f047a2a58186b">More...</a><br /></td></tr>
<tr class="separator:a9e02e6cff6f2f878a10f047a2a58186b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf7d471023c957586eec6c790f6436e6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6">uspoof_areConfusable</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *id1, int32_t length1, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *id2, int32_t length2, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:abf7d471023c957586eec6c790f6436e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check the whether two specified strings are visually confusable.  <a href="#abf7d471023c957586eec6c790f6436e6">More...</a><br /></td></tr>
<tr class="separator:abf7d471023c957586eec6c790f6436e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1a1840ebe1d9b90429faed50063b63e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#aa1a1840ebe1d9b90429faed50063b63e">uspoof_areConfusableUTF8</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, const char *id1, int32_t length1, const char *id2, int32_t length2, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:aa1a1840ebe1d9b90429faed50063b63e"><td class="mdescLeft">&#160;</td><td class="mdescRight">A version of <a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6">uspoof_areConfusable</a> accepting strings in UTF-8 format.  <a href="#aa1a1840ebe1d9b90429faed50063b63e">More...</a><br /></td></tr>
<tr class="separator:aa1a1840ebe1d9b90429faed50063b63e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed5fb4ecf6a816ea23874f35514e7553"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#aed5fb4ecf6a816ea23874f35514e7553">uspoof_areConfusableUnicodeString</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, const <a class="el" href="classicu_1_1UnicodeString.html">icu::UnicodeString</a> &amp;s1, const <a class="el" href="classicu_1_1UnicodeString.html">icu::UnicodeString</a> &amp;s2, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:aed5fb4ecf6a816ea23874f35514e7553"><td class="mdescLeft">&#160;</td><td class="mdescRight">A version of <a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6">uspoof_areConfusable</a> accepting UnicodeStrings.  <a href="#aed5fb4ecf6a816ea23874f35514e7553">More...</a><br /></td></tr>
<tr class="separator:aed5fb4ecf6a816ea23874f35514e7553"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5d4f956191fe5395bdaeb57e8a667f9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#ab5d4f956191fe5395bdaeb57e8a667f9">uspoof_getSkeleton</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, uint32_t type, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *id, int32_t length, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *dest, int32_t destCapacity, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:ab5d4f956191fe5395bdaeb57e8a667f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the "skeleton" for an identifier.  <a href="#ab5d4f956191fe5395bdaeb57e8a667f9">More...</a><br /></td></tr>
<tr class="separator:ab5d4f956191fe5395bdaeb57e8a667f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b9d8c2ad5a77b364fff8abe29d9e1db"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a4b9d8c2ad5a77b364fff8abe29d9e1db">uspoof_getSkeletonUTF8</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, uint32_t type, const char *id, int32_t length, char *dest, int32_t destCapacity, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a4b9d8c2ad5a77b364fff8abe29d9e1db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the "skeleton" for an identifier.  <a href="#a4b9d8c2ad5a77b364fff8abe29d9e1db">More...</a><br /></td></tr>
<tr class="separator:a4b9d8c2ad5a77b364fff8abe29d9e1db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a964c0b001cb9a5b3ffb08ae1df8e7556"><td class="memItemLeft" align="right" valign="top"><a class="el" href="utypes_8h.html#ab9d90a30137b6ec046fe59e79b09745a">U_I18N_API</a> <a class="el" href="classicu_1_1UnicodeString.html">icu::UnicodeString</a> &amp;U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a964c0b001cb9a5b3ffb08ae1df8e7556">uspoof_getSkeletonUnicodeString</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, uint32_t type, const <a class="el" href="classicu_1_1UnicodeString.html">icu::UnicodeString</a> &amp;id, <a class="el" href="classicu_1_1UnicodeString.html">icu::UnicodeString</a> &amp;dest, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a964c0b001cb9a5b3ffb08ae1df8e7556"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the "skeleton" for an identifier.  <a href="#a964c0b001cb9a5b3ffb08ae1df8e7556">More...</a><br /></td></tr>
<tr class="separator:a964c0b001cb9a5b3ffb08ae1df8e7556"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a238dd6a2e20212b3a14c392355ecc62d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> const <a class="el" href="ucnv_8h.html#adce3fef7c15d7c78196bf977ac96ec9c">USet</a> *U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a238dd6a2e20212b3a14c392355ecc62d">uspoof_getInclusionSet</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a238dd6a2e20212b3a14c392355ecc62d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the set of Candidate Characters for Inclusion in Identifiers, as defined in <a href="http://unicode.org/Public/security/latest/xidmodifications.txt">http://unicode.org/Public/security/latest/xidmodifications.txt</a> and documented in <a href="http://www.unicode.org/reports/tr39/,">http://www.unicode.org/reports/tr39/,</a> Unicode Security Mechanisms.  <a href="#a238dd6a2e20212b3a14c392355ecc62d">More...</a><br /></td></tr>
<tr class="separator:a238dd6a2e20212b3a14c392355ecc62d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a708cce542934ad1d604518ed48162bbc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> const <a class="el" href="ucnv_8h.html#adce3fef7c15d7c78196bf977ac96ec9c">USet</a> *U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a708cce542934ad1d604518ed48162bbc">uspoof_getRecommendedSet</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a708cce542934ad1d604518ed48162bbc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the set of characters from Recommended Scripts for Inclusion in Identifiers, as defined in <a href="http://unicode.org/Public/security/latest/xidmodifications.txt">http://unicode.org/Public/security/latest/xidmodifications.txt</a> and documented in <a href="http://www.unicode.org/reports/tr39/,">http://www.unicode.org/reports/tr39/,</a> Unicode Security Mechanisms.  <a href="#a708cce542934ad1d604518ed48162bbc">More...</a><br /></td></tr>
<tr class="separator:a708cce542934ad1d604518ed48162bbc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a244a3f41ef710e3689a9bb741638a37f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> const <a class="el" href="classicu_1_1UnicodeSet.html">icu::UnicodeSet</a> *U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a244a3f41ef710e3689a9bb741638a37f">uspoof_getInclusionUnicodeSet</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a244a3f41ef710e3689a9bb741638a37f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the set of Candidate Characters for Inclusion in Identifiers, as defined in <a href="http://unicode.org/Public/security/latest/xidmodifications.txt">http://unicode.org/Public/security/latest/xidmodifications.txt</a> and documented in <a href="http://www.unicode.org/reports/tr39/,">http://www.unicode.org/reports/tr39/,</a> Unicode Security Mechanisms.  <a href="#a244a3f41ef710e3689a9bb741638a37f">More...</a><br /></td></tr>
<tr class="separator:a244a3f41ef710e3689a9bb741638a37f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa74301abff43c60ecbdd1e8229127250"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> const <a class="el" href="classicu_1_1UnicodeSet.html">icu::UnicodeSet</a> *U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#aa74301abff43c60ecbdd1e8229127250">uspoof_getRecommendedUnicodeSet</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:aa74301abff43c60ecbdd1e8229127250"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the set of characters from Recommended Scripts for Inclusion in Identifiers, as defined in <a href="http://unicode.org/Public/security/latest/xidmodifications.txt">http://unicode.org/Public/security/latest/xidmodifications.txt</a> and documented in <a href="http://www.unicode.org/reports/tr39/,">http://www.unicode.org/reports/tr39/,</a> Unicode Security Mechanisms.  <a href="#aa74301abff43c60ecbdd1e8229127250">More...</a><br /></td></tr>
<tr class="separator:aa74301abff43c60ecbdd1e8229127250"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afffc5760a76109170f4a03ea57964e6c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#afffc5760a76109170f4a03ea57964e6c">uspoof_serialize</a> (<a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, void *data, int32_t capacity, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:afffc5760a76109170f4a03ea57964e6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serialize the data for a spoof detector into a chunk of memory.  <a href="#afffc5760a76109170f4a03ea57964e6c">More...</a><br /></td></tr>
<tr class="separator:afffc5760a76109170f4a03ea57964e6c"><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>Unicode Security and Spoofing Detection, C API. </p>
<p>This class, based on <a href="http://unicode.org/reports/tr36">Unicode Technical Report #36</a> and <a href="http://unicode.org/reports/tr39">Unicode Technical Standard #39</a>, has two main functions:</p>
<ol>
<li>
Checking whether two strings are visually <em>confusable</em> with each other, such as "Harvest" and &quot;&Eta;arvest&quot;, where the second string starts with the Greek capital letter Eta. </li>
<li>
Checking whether an individual string is likely to be an attempt at confusing the reader (<em>spoof detection</em>), such as "paypal" with some Latin characters substituted with Cyrillic look-alikes. </li>
</ol>
<p>Although originally designed as a method for flagging suspicious identifier strings such as URLs, <code>USpoofChecker</code> has a number of other practical use cases, such as preventing attempts to evade bad-word content filters.</p>
<p>The functions of this class are exposed as C API, with a handful of syntactical conveniences for C++.</p>
<h2>Confusables</h2>
<p>The following example shows how to use <code>USpoofChecker</code> to check for confusability between two strings:</p>
<div class="fragment"><div class="line"><a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div><div class="line"><a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* str1 = (<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>*) u<span class="stringliteral">&quot;Harvest&quot;</span>;</div><div class="line"><a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* str2 = (<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>*) u<span class="stringliteral">&quot;\u0397arvest&quot;</span>;  <span class="comment">// with U+0397 GREEK CAPITAL LETTER ETA</span></div><div class="line"></div><div class="line"><a class="code" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a>* sc = <a class="code" href="uspoof_8h.html#afeff54ce632c1357e914334009becb62">uspoof_open</a>(&amp;status);</div><div class="line"><a class="code" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab">uspoof_setChecks</a>(sc, <a class="code" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a42d6035a2e66bfcf39b0e838168afdba">USPOOF_CONFUSABLE</a>, &amp;status);</div><div class="line"></div><div class="line">int32_t bitmask = <a class="code" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6">uspoof_areConfusable</a>(sc, str1, -1, str2, -1, &amp;status);</div><div class="line"><a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> result = bitmask != 0;</div><div class="line"><span class="comment">// areConfusable: 1 (status: U_ZERO_ERROR)</span></div><div class="line">printf(<span class="stringliteral">&quot;areConfusable: %d (status: %s)\n&quot;</span>, result, <a class="code" href="utypes_8h.html#a89eb455526bb29bf5350ee861d81df92">u_errorName</a>(status));</div><div class="line"><a class="code" href="uspoof_8h.html#ab63b4f7780b1d6c57a31624ad5c3db41">uspoof_close</a>(sc);</div></div><!-- fragment --><p>The call to <a class="el" href="uspoof_8h.html#afeff54ce632c1357e914334009becb62">uspoof_open</a> creates a <code>USpoofChecker</code> object; the call to <a class="el" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab">uspoof_setChecks</a> enables confusable checking and disables all other checks; the call to <a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6">uspoof_areConfusable</a> performs the confusability test; and the following line extracts the result out of the return value. For best performance, the instance should be created once (e.g., upon application startup), and the efficient <a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6">uspoof_areConfusable</a> method can be used at runtime.</p>
<p>The type <a class="el" href="classLocalUSpoofCheckerPointer.html">LocalUSpoofCheckerPointer</a> is exposed for C++ programmers. It will automatically call <a class="el" href="uspoof_8h.html#ab63b4f7780b1d6c57a31624ad5c3db41">uspoof_close</a> when the object goes out of scope:</p>
<div class="fragment"><div class="line"><a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div><div class="line"><a class="code" href="classLocalUSpoofCheckerPointer.html">LocalUSpoofCheckerPointer</a> sc(<a class="code" href="uspoof_8h.html#afeff54ce632c1357e914334009becb62">uspoof_open</a>(&amp;status));</div><div class="line"><a class="code" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab">uspoof_setChecks</a>(sc.getAlias(), <a class="code" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a42d6035a2e66bfcf39b0e838168afdba">USPOOF_CONFUSABLE</a>, &amp;status);</div><div class="line"><span class="comment">// ...</span></div></div><!-- fragment --><p>UTS 39 defines two strings to be <em>confusable</em> if they map to the same <em>skeleton string</em>. A skeleton can be thought of as a "hash code". <a class="el" href="uspoof_8h.html#ab5d4f956191fe5395bdaeb57e8a667f9">uspoof_getSkeleton</a> computes the skeleton for a particular string, so the following snippet is equivalent to the example above:</p>
<div class="fragment"><div class="line"><a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div><div class="line"><a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* str1 = (<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>*) u<span class="stringliteral">&quot;Harvest&quot;</span>;</div><div class="line"><a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* str2 = (<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>*) u<span class="stringliteral">&quot;\u0397arvest&quot;</span>;  <span class="comment">// with U+0397 GREEK CAPITAL LETTER ETA</span></div><div class="line"></div><div class="line"><a class="code" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a>* sc = <a class="code" href="uspoof_8h.html#afeff54ce632c1357e914334009becb62">uspoof_open</a>(&amp;status);</div><div class="line"><a class="code" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab">uspoof_setChecks</a>(sc, <a class="code" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a42d6035a2e66bfcf39b0e838168afdba">USPOOF_CONFUSABLE</a>, &amp;status);</div><div class="line"></div><div class="line"><span class="comment">// Get skeleton 1</span></div><div class="line">int32_t skel1Len = <a class="code" href="uspoof_8h.html#ab5d4f956191fe5395bdaeb57e8a667f9">uspoof_getSkeleton</a>(sc, 0, str1, -1, <a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, 0, &amp;status);</div><div class="line"><a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* skel1 = (<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>*) malloc(++skel1Len * <span class="keyword">sizeof</span>(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>));</div><div class="line">status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div><div class="line"><a class="code" href="uspoof_8h.html#ab5d4f956191fe5395bdaeb57e8a667f9">uspoof_getSkeleton</a>(sc, 0, str1, -1, skel1, skel1Len, &amp;status);</div><div class="line"></div><div class="line"><span class="comment">// Get skeleton 2</span></div><div class="line">int32_t skel2Len = <a class="code" href="uspoof_8h.html#ab5d4f956191fe5395bdaeb57e8a667f9">uspoof_getSkeleton</a>(sc, 0, str2, -1, <a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, 0, &amp;status);</div><div class="line"><a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* skel2 = (<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>*) malloc(++skel2Len * <span class="keyword">sizeof</span>(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>));</div><div class="line">status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div><div class="line"><a class="code" href="uspoof_8h.html#ab5d4f956191fe5395bdaeb57e8a667f9">uspoof_getSkeleton</a>(sc, 0, str2, -1, skel2, skel2Len, &amp;status);</div><div class="line"></div><div class="line"><span class="comment">// Are the skeletons the same?</span></div><div class="line"><a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> result = <a class="code" href="ustring_8h.html#abdb8af67ab5198b9db020afa9c3114b3">u_strcmp</a>(skel1, skel2) == 0;</div><div class="line"><span class="comment">// areConfusable: 1 (status: U_ZERO_ERROR)</span></div><div class="line">printf(<span class="stringliteral">&quot;areConfusable: %d (status: %s)\n&quot;</span>, result, <a class="code" href="utypes_8h.html#a89eb455526bb29bf5350ee861d81df92">u_errorName</a>(status));</div><div class="line"><a class="code" href="uspoof_8h.html#ab63b4f7780b1d6c57a31624ad5c3db41">uspoof_close</a>(sc);</div><div class="line">free(skel1);</div><div class="line">free(skel2);</div></div><!-- fragment --><p>If you need to check if a string is confusable with any string in a dictionary of many strings, rather than calling <a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6">uspoof_areConfusable</a> many times in a loop, <a class="el" href="uspoof_8h.html#ab5d4f956191fe5395bdaeb57e8a667f9">uspoof_getSkeleton</a> can be used instead, as shown below:</p>
<div class="fragment"><div class="line"><a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div><div class="line"><span class="preprocessor">#define DICTIONARY_LENGTH 2</span></div><div class="line"><a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* dictionary[DICTIONARY_LENGTH] = { (<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>*) u<span class="stringliteral">&quot;lorem&quot;</span>, (<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>*) u<span class="stringliteral">&quot;ipsum&quot;</span> };</div><div class="line"><a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* skeletons[DICTIONARY_LENGTH];</div><div class="line"><a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* str = (<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>*) u<span class="stringliteral">&quot;1orern&quot;</span>;</div><div class="line"></div><div class="line"><span class="comment">// Setup:</span></div><div class="line"><a class="code" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a>* sc = <a class="code" href="uspoof_8h.html#afeff54ce632c1357e914334009becb62">uspoof_open</a>(&amp;status);</div><div class="line"><a class="code" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab">uspoof_setChecks</a>(sc, <a class="code" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a42d6035a2e66bfcf39b0e838168afdba">USPOOF_CONFUSABLE</a>, &amp;status);</div><div class="line"><span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;DICTIONARY_LENGTH; i++) {</div><div class="line">    <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* word = dictionary[i];</div><div class="line">    int32_t len = <a class="code" href="uspoof_8h.html#ab5d4f956191fe5395bdaeb57e8a667f9">uspoof_getSkeleton</a>(sc, 0, word, -1, <a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, 0, &amp;status);</div><div class="line">    skeletons[i] = (<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>*) malloc(++len * <span class="keyword">sizeof</span>(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>));</div><div class="line">    status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div><div class="line">    <a class="code" href="uspoof_8h.html#ab5d4f956191fe5395bdaeb57e8a667f9">uspoof_getSkeleton</a>(sc, 0, word, -1, skeletons[i], len, &amp;status);</div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">// Live Check:</span></div><div class="line">{</div><div class="line">    int32_t len = <a class="code" href="uspoof_8h.html#ab5d4f956191fe5395bdaeb57e8a667f9">uspoof_getSkeleton</a>(sc, 0, str, -1, <a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, 0, &amp;status);</div><div class="line">    <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* skel = (<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>*) malloc(++len * <span class="keyword">sizeof</span>(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>));</div><div class="line">    status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div><div class="line">    <a class="code" href="uspoof_8h.html#ab5d4f956191fe5395bdaeb57e8a667f9">uspoof_getSkeleton</a>(sc, 0, str, -1, skel, len, &amp;status);</div><div class="line">    <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> result = <a class="code" href="umachine_8h.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a>;</div><div class="line">    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;DICTIONARY_LENGTH; i++) {</div><div class="line">        result = <a class="code" href="ustring_8h.html#abdb8af67ab5198b9db020afa9c3114b3">u_strcmp</a>(skel, skeletons[i]) == 0;</div><div class="line">        <span class="keywordflow">if</span> (result == <a class="code" href="umachine_8h.html#aa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>) { <span class="keywordflow">break</span>; }</div><div class="line">    }</div><div class="line">    <span class="comment">// Has confusable in dictionary: 1 (status: U_ZERO_ERROR)</span></div><div class="line">    printf(<span class="stringliteral">&quot;Has confusable in dictionary: %d (status: %s)\n&quot;</span>, result, <a class="code" href="utypes_8h.html#a89eb455526bb29bf5350ee861d81df92">u_errorName</a>(status));</div><div class="line">    free(skel);</div><div class="line">}</div><div class="line"></div><div class="line"><span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;DICTIONARY_LENGTH; i++) {</div><div class="line">    free(skeletons[i]);</div><div class="line">}</div><div class="line"><a class="code" href="uspoof_8h.html#ab63b4f7780b1d6c57a31624ad5c3db41">uspoof_close</a>(sc);</div></div><!-- fragment --><p><b>Note:</b> Since the Unicode confusables mapping table is frequently updated, confusable skeletons are <em>not</em> guaranteed to be the same between ICU releases. We therefore recommend that you always compute confusable skeletons at runtime and do not rely on creating a permanent, or difficult to update, database of skeletons.</p>
<h2>Spoof Detection</h2>
<p>The following snippet shows a minimal example of using <code>USpoofChecker</code> to perform spoof detection on a string:</p>
<div class="fragment"><div class="line"><a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div><div class="line"><a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* str = (<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>*) u<span class="stringliteral">&quot;p\u0430ypal&quot;</span>;  <span class="comment">// with U+0430 CYRILLIC SMALL LETTER A</span></div><div class="line"></div><div class="line"><span class="comment">// Get the default set of allowable characters:</span></div><div class="line"><a class="code" href="ucnv_8h.html#adce3fef7c15d7c78196bf977ac96ec9c">USet</a>* allowed = <a class="code" href="uset_8h.html#a1445e2108f5b4c26b4a03cb99b3e6e57">uset_openEmpty</a>();</div><div class="line"><a class="code" href="uset_8h.html#acb550f469f833d41c14536ea11bf54be">uset_addAll</a>(allowed, <a class="code" href="uspoof_8h.html#a708cce542934ad1d604518ed48162bbc">uspoof_getRecommendedSet</a>(&amp;status));</div><div class="line"><a class="code" href="uset_8h.html#acb550f469f833d41c14536ea11bf54be">uset_addAll</a>(allowed, <a class="code" href="uspoof_8h.html#a238dd6a2e20212b3a14c392355ecc62d">uspoof_getInclusionSet</a>(&amp;status));</div><div class="line"></div><div class="line"><a class="code" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a>* sc = <a class="code" href="uspoof_8h.html#afeff54ce632c1357e914334009becb62">uspoof_open</a>(&amp;status);</div><div class="line"><a class="code" href="uspoof_8h.html#a39e66376b958996302cd4a53b16c0548">uspoof_setAllowedChars</a>(sc, allowed, &amp;status);</div><div class="line"><a class="code" href="uspoof_8h.html#aa15e811b7f72face34a24012a02a945e">uspoof_setRestrictionLevel</a>(sc, <a class="code" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852a06d4bf8b1c05dca9a9ec69a0e926e117">USPOOF_MODERATELY_RESTRICTIVE</a>);</div><div class="line"></div><div class="line">int32_t bitmask = <a class="code" href="uspoof_8h.html#a21bb11dd91519e5033d43036a30e4d67">uspoof_check</a>(sc, str, -1, <a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, &amp;status);</div><div class="line"><a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> result = bitmask != 0;</div><div class="line"><span class="comment">// fails checks: 1 (status: U_ZERO_ERROR)</span></div><div class="line">printf(<span class="stringliteral">&quot;fails checks: %d (status: %s)\n&quot;</span>, result, <a class="code" href="utypes_8h.html#a89eb455526bb29bf5350ee861d81df92">u_errorName</a>(status));</div><div class="line"><a class="code" href="uspoof_8h.html#ab63b4f7780b1d6c57a31624ad5c3db41">uspoof_close</a>(sc);</div><div class="line"><a class="code" href="uset_8h.html#abb0d0fb8d660204fd7fef7fe920bb70c">uset_close</a>(allowed);</div></div><!-- fragment --><p>As in the case for confusability checking, it is good practice to create one <code>USpoofChecker</code> instance at startup, and call the cheaper <a class="el" href="uspoof_8h.html#a21bb11dd91519e5033d43036a30e4d67">uspoof_check</a> online. We specify the set of allowed characters to be those with type RECOMMENDED or INCLUSION, according to the recommendation in UTS 39.</p>
<p>In addition to <a class="el" href="uspoof_8h.html#a21bb11dd91519e5033d43036a30e4d67">uspoof_check</a>, the function <a class="el" href="uspoof_8h.html#a14443b1ccec5e500b1ce0c0b259b313a">uspoof_checkUTF8</a> is exposed for UTF8-encoded char* strings, and <a class="el" href="uspoof_8h.html#ae165c7f55213376cda5274045a4cd888">uspoof_checkUnicodeString</a> is exposed for C++ programmers.</p>
<p>If the <a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155aa7307e5bdc933ceba391fbbc22b382ab">USPOOF_AUX_INFO</a> check is enabled, a limited amount of information on why a string failed the checks is available in the returned bitmask. For complete information, use the <a class="el" href="uspoof_8h.html#ae24189f414f6c0c5dad07a8afe840107">uspoof_check2</a> class of functions with a <a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a> parameter:</p>
<div class="fragment"><div class="line"><a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div><div class="line"><a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* str = (<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>*) u<span class="stringliteral">&quot;p\u0430ypal&quot;</span>;  <span class="comment">// with U+0430 CYRILLIC SMALL LETTER A</span></div><div class="line"></div><div class="line"><span class="comment">// Get the default set of allowable characters:</span></div><div class="line"><a class="code" href="ucnv_8h.html#adce3fef7c15d7c78196bf977ac96ec9c">USet</a>* allowed = <a class="code" href="uset_8h.html#a1445e2108f5b4c26b4a03cb99b3e6e57">uset_openEmpty</a>();</div><div class="line"><a class="code" href="uset_8h.html#acb550f469f833d41c14536ea11bf54be">uset_addAll</a>(allowed, <a class="code" href="uspoof_8h.html#a708cce542934ad1d604518ed48162bbc">uspoof_getRecommendedSet</a>(&amp;status));</div><div class="line"><a class="code" href="uset_8h.html#acb550f469f833d41c14536ea11bf54be">uset_addAll</a>(allowed, <a class="code" href="uspoof_8h.html#a238dd6a2e20212b3a14c392355ecc62d">uspoof_getInclusionSet</a>(&amp;status));</div><div class="line"></div><div class="line"><a class="code" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a>* sc = <a class="code" href="uspoof_8h.html#afeff54ce632c1357e914334009becb62">uspoof_open</a>(&amp;status);</div><div class="line"><a class="code" href="uspoof_8h.html#a39e66376b958996302cd4a53b16c0548">uspoof_setAllowedChars</a>(sc, allowed, &amp;status);</div><div class="line"><a class="code" href="uspoof_8h.html#aa15e811b7f72face34a24012a02a945e">uspoof_setRestrictionLevel</a>(sc, <a class="code" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852a06d4bf8b1c05dca9a9ec69a0e926e117">USPOOF_MODERATELY_RESTRICTIVE</a>);</div><div class="line"></div><div class="line"><a class="code" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a>* checkResult = <a class="code" href="uspoof_8h.html#af815a3ac7c924bc79058029445069fda">uspoof_openCheckResult</a>(&amp;status);</div><div class="line">int32_t bitmask = <a class="code" href="uspoof_8h.html#ae24189f414f6c0c5dad07a8afe840107">uspoof_check2</a>(sc, str, -1, checkResult, &amp;status);</div><div class="line"></div><div class="line">int32_t failures1 = bitmask;</div><div class="line">int32_t failures2 = <a class="code" href="uspoof_8h.html#a109dc9f022e1c9a8044684c553ce9b66">uspoof_getCheckResultChecks</a>(checkResult, &amp;status);</div><div class="line">assert(failures1 == failures2);</div><div class="line"><span class="comment">// checks that failed: 0x00000010 (status: U_ZERO_ERROR)</span></div><div class="line">printf(<span class="stringliteral">&quot;checks that failed: %#010x (status: %s)\n&quot;</span>, failures1, <a class="code" href="utypes_8h.html#a89eb455526bb29bf5350ee861d81df92">u_errorName</a>(status));</div><div class="line"></div><div class="line"><span class="comment">// Cleanup:</span></div><div class="line"><a class="code" href="uspoof_8h.html#ab63b4f7780b1d6c57a31624ad5c3db41">uspoof_close</a>(sc);</div><div class="line"><a class="code" href="uset_8h.html#abb0d0fb8d660204fd7fef7fe920bb70c">uset_close</a>(allowed);</div><div class="line"><a class="code" href="uspoof_8h.html#aea80fdd47684dca9a6c9378e981e17c9">uspoof_closeCheckResult</a>(checkResult);</div></div><!-- fragment --><p>C++ users can take advantage of a few syntactical conveniences. The following snippet is functionally equivalent to the one above:</p>
<div class="fragment"><div class="line"><a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div><div class="line">UnicodeString str((<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>*) u<span class="stringliteral">&quot;p\u0430ypal&quot;</span>);  <span class="comment">// with U+0430 CYRILLIC SMALL LETTER A</span></div><div class="line"></div><div class="line"><span class="comment">// Get the default set of allowable characters:</span></div><div class="line">UnicodeSet allowed;</div><div class="line">allowed.addAll(*<a class="code" href="uspoof_8h.html#aa74301abff43c60ecbdd1e8229127250">uspoof_getRecommendedUnicodeSet</a>(&amp;status));</div><div class="line">allowed.addAll(*<a class="code" href="uspoof_8h.html#a244a3f41ef710e3689a9bb741638a37f">uspoof_getInclusionUnicodeSet</a>(&amp;status));</div><div class="line"></div><div class="line"><a class="code" href="classLocalUSpoofCheckerPointer.html">LocalUSpoofCheckerPointer</a> sc(<a class="code" href="uspoof_8h.html#afeff54ce632c1357e914334009becb62">uspoof_open</a>(&amp;status));</div><div class="line"><a class="code" href="uspoof_8h.html#a39e66376b958996302cd4a53b16c0548">uspoof_setAllowedChars</a>(sc.getAlias(), allowed.toUSet(), &amp;status);</div><div class="line"><a class="code" href="uspoof_8h.html#aa15e811b7f72face34a24012a02a945e">uspoof_setRestrictionLevel</a>(sc.getAlias(), <a class="code" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852a06d4bf8b1c05dca9a9ec69a0e926e117">USPOOF_MODERATELY_RESTRICTIVE</a>);</div><div class="line"></div><div class="line"><a class="code" href="classLocalUSpoofCheckResultPointer.html">LocalUSpoofCheckResultPointer</a> checkResult(<a class="code" href="uspoof_8h.html#af815a3ac7c924bc79058029445069fda">uspoof_openCheckResult</a>(&amp;status));</div><div class="line">int32_t bitmask = <a class="code" href="uspoof_8h.html#a8d6637ca53487880711d714e1181ca7c">uspoof_check2UnicodeString</a>(sc.getAlias(), str, checkResult.getAlias(), &amp;status);</div><div class="line"></div><div class="line">int32_t failures1 = bitmask;</div><div class="line">int32_t failures2 = <a class="code" href="uspoof_8h.html#a109dc9f022e1c9a8044684c553ce9b66">uspoof_getCheckResultChecks</a>(checkResult.getAlias(), &amp;status);</div><div class="line">assert(failures1 == failures2);</div><div class="line"><span class="comment">// checks that failed: 0x00000010 (status: U_ZERO_ERROR)</span></div><div class="line">printf(<span class="stringliteral">&quot;checks that failed: %#010x (status: %s)\n&quot;</span>, failures1, <a class="code" href="utypes_8h.html#a89eb455526bb29bf5350ee861d81df92">u_errorName</a>(status));</div><div class="line"></div><div class="line"><span class="comment">// Explicit cleanup not necessary.</span></div></div><!-- fragment --><p>The return value is a bitmask of the checks that failed. In this case, there was one check that failed: <a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a1977848d7ccac6f3640fa684b452f69a">USPOOF_RESTRICTION_LEVEL</a>, corresponding to the fifth bit (16). The possible checks are:</p>
<ul>
<li>
<code>RESTRICTION_LEVEL</code>: flags strings that violate the <a href="http://unicode.org/reports/tr39/#Restriction_Level_Detection">Restriction Level</a> test as specified in UTS 39; in most cases, this means flagging strings that contain characters from multiple different scripts. </li>
<li>
<code>INVISIBLE</code>: flags strings that contain invisible characters, such as zero-width spaces, or character sequences that are likely not to display, such as multiple occurrences of the same non-spacing mark. </li>
<li>
<code>CHAR_LIMIT</code>: flags strings that contain characters outside of a specified set of acceptable characters. See <a class="el" href="uspoof_8h.html#a39e66376b958996302cd4a53b16c0548">uspoof_setAllowedChars</a> and <a class="el" href="uspoof_8h.html#a51e28e636fbb5707f66ef4d4caff5de0">uspoof_setAllowedLocales</a>. </li>
<li>
<code>MIXED_NUMBERS</code>: flags strings that contain digits from multiple different numbering systems. </li>
</ul>
<p>These checks can be enabled independently of each other. For example, if you were interested in checking for only the INVISIBLE and MIXED_NUMBERS conditions, you could do:</p>
<div class="fragment"><div class="line"><a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div><div class="line"><a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* str = (<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>*) u<span class="stringliteral">&quot;8\u09EA&quot;</span>;  <span class="comment">// 8 mixed with U+09EA BENGALI DIGIT FOUR</span></div><div class="line"></div><div class="line"><a class="code" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a>* sc = <a class="code" href="uspoof_8h.html#afeff54ce632c1357e914334009becb62">uspoof_open</a>(&amp;status);</div><div class="line"><a class="code" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab">uspoof_setChecks</a>(sc, <a class="code" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a7324a51073ca18279da8706d8c21ee0c">USPOOF_INVISIBLE</a> | <a class="code" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a0fbfe4596de0672faf4f0d4f01a823f6">USPOOF_MIXED_NUMBERS</a>, &amp;status);</div><div class="line"></div><div class="line">int32_t bitmask = <a class="code" href="uspoof_8h.html#ae24189f414f6c0c5dad07a8afe840107">uspoof_check2</a>(sc, str, -1, <a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, &amp;status);</div><div class="line"><a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> result = bitmask != 0;</div><div class="line"><span class="comment">// fails checks: 1 (status: U_ZERO_ERROR)</span></div><div class="line">printf(<span class="stringliteral">&quot;fails checks: %d (status: %s)\n&quot;</span>, result, <a class="code" href="utypes_8h.html#a89eb455526bb29bf5350ee861d81df92">u_errorName</a>(status));</div><div class="line"><a class="code" href="uspoof_8h.html#ab63b4f7780b1d6c57a31624ad5c3db41">uspoof_close</a>(sc);</div></div><!-- fragment --><p>Here is an example in C++ showing how to compute the restriction level of a string:</p>
<div class="fragment"><div class="line"><a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div><div class="line">UnicodeString str((<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>*) u<span class="stringliteral">&quot;p\u0430ypal&quot;</span>);  <span class="comment">// with U+0430 CYRILLIC SMALL LETTER A</span></div><div class="line"></div><div class="line"><span class="comment">// Get the default set of allowable characters:</span></div><div class="line">UnicodeSet allowed;</div><div class="line">allowed.addAll(*<a class="code" href="uspoof_8h.html#aa74301abff43c60ecbdd1e8229127250">uspoof_getRecommendedUnicodeSet</a>(&amp;status));</div><div class="line">allowed.addAll(*<a class="code" href="uspoof_8h.html#a244a3f41ef710e3689a9bb741638a37f">uspoof_getInclusionUnicodeSet</a>(&amp;status));</div><div class="line"></div><div class="line"><a class="code" href="classLocalUSpoofCheckerPointer.html">LocalUSpoofCheckerPointer</a> sc(<a class="code" href="uspoof_8h.html#afeff54ce632c1357e914334009becb62">uspoof_open</a>(&amp;status));</div><div class="line"><a class="code" href="uspoof_8h.html#a39e66376b958996302cd4a53b16c0548">uspoof_setAllowedChars</a>(sc.getAlias(), allowed.toUSet(), &amp;status);</div><div class="line"><a class="code" href="uspoof_8h.html#aa15e811b7f72face34a24012a02a945e">uspoof_setRestrictionLevel</a>(sc.getAlias(), <a class="code" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852a06d4bf8b1c05dca9a9ec69a0e926e117">USPOOF_MODERATELY_RESTRICTIVE</a>);</div><div class="line"><a class="code" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab">uspoof_setChecks</a>(sc.getAlias(), <a class="code" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a1977848d7ccac6f3640fa684b452f69a">USPOOF_RESTRICTION_LEVEL</a> | <a class="code" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155aa7307e5bdc933ceba391fbbc22b382ab">USPOOF_AUX_INFO</a>, &amp;status);</div><div class="line"></div><div class="line"><a class="code" href="classLocalUSpoofCheckResultPointer.html">LocalUSpoofCheckResultPointer</a> checkResult(<a class="code" href="uspoof_8h.html#af815a3ac7c924bc79058029445069fda">uspoof_openCheckResult</a>(&amp;status));</div><div class="line">int32_t bitmask = <a class="code" href="uspoof_8h.html#a8d6637ca53487880711d714e1181ca7c">uspoof_check2UnicodeString</a>(sc.getAlias(), str, checkResult.getAlias(), &amp;status);</div><div class="line"></div><div class="line"><a class="code" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852">URestrictionLevel</a> restrictionLevel = <a class="code" href="uspoof_8h.html#ac1350f398faf02177b323bf21a8ffa1e">uspoof_getCheckResultRestrictionLevel</a>(checkResult.getAlias(), &amp;status);</div><div class="line"><span class="comment">// Since USPOOF_AUX_INFO was enabled, the restriction level is also available in the upper bits of the bitmask:</span></div><div class="line">assert((restrictionLevel &amp; bitmask) == restrictionLevel);</div><div class="line"><span class="comment">// Restriction level: 0x50000000 (status: U_ZERO_ERROR)</span></div><div class="line">printf(<span class="stringliteral">&quot;Restriction level: %#010x (status: %s)\n&quot;</span>, restrictionLevel, <a class="code" href="utypes_8h.html#a89eb455526bb29bf5350ee861d81df92">u_errorName</a>(status));</div></div><!-- fragment --><p>The code '0x50000000' corresponds to the restriction level USPOOF_MINIMALLY_RESTRICTIVE. Since USPOOF_MINIMALLY_RESTRICTIVE is weaker than USPOOF_MODERATELY_RESTRICTIVE, the string fails the check.</p>
<p><b>Note:</b> The Restriction Level is the most powerful of the checks. The full logic is documented in <a href="http://unicode.org/reports/tr39/#Restriction_Level_Detection">UTS 39</a>, but the basic idea is that strings are restricted to contain characters from only a single script, <em>except</em> that most scripts are allowed to have Latin characters interspersed. Although the default restriction level is <code>HIGHLY_RESTRICTIVE</code>, it is recommended that users set their restriction level to <code>MODERATELY_RESTRICTIVE</code>, which allows Latin mixed with all other scripts except Cyrillic, Greek, and Cherokee, with which it is often confusable. For more details on the levels, see UTS 39 or <a class="el" href="uspoof_8h.html#ac129ea51214fb8cd249bb07500c1c2fc">URestrictionLevel</a>. The Restriction Level test is aware of the set of allowed characters set in <a class="el" href="uspoof_8h.html#a39e66376b958996302cd4a53b16c0548">uspoof_setAllowedChars</a>. Note that characters which have script code COMMON or INHERITED, such as numbers and punctuation, are ignored when computing whether a string has multiple scripts.</p>
<h2>Additional Information</h2>
<p>A <code>USpoofChecker</code> instance may be used repeatedly to perform checks on any number of identifiers.</p>
<p><b>Thread Safety:</b> The test functions for checking a single identifier, or for testing whether two identifiers are possible confusable, are thread safe. They may called concurrently, from multiple threads, using the same USpoofChecker instance.</p>
<p>More generally, the standard ICU thread safety rules apply: functions that take a const USpoofChecker parameter are thread safe. Those that take a non-const USpoofChecker are not thread safe..</p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005550">Stable:</a></b></dt><dd>ICU 4.6 </dd></dl>

<p>Definition in file <a class="el" href="uspoof_8h_source.html">uspoof.h</a>.</p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="ac129ea51214fb8cd249bb07500c1c2fc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef enum <a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852">URestrictionLevel</a>  <a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852">URestrictionLevel</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constants from UAX #39 for use in <a class="el" href="uspoof_8h.html#aa15e811b7f72face34a24012a02a945e">uspoof_setRestrictionLevel</a>, and for returned identifier restriction levels in check results. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005552">Stable:</a></b></dt><dd>ICU 51</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#aa15e811b7f72face34a24012a02a945e" title="Set the loosest restriction level allowed for strings. ">uspoof_setRestrictionLevel</a> </dd>
<dd>
<a class="el" href="uspoof_8h.html#a21bb11dd91519e5033d43036a30e4d67" title="Check the specified string for possible security issues. ">uspoof_check</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ab4d0a57ce124af1f838739437aae20f9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a> <a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#af815a3ac7c924bc79058029445069fda" title="Create a USpoofCheckResult, used by the uspoof_check2 class of functions to return information about ...">uspoof_openCheckResult</a> </dd></dl>

<p>Definition at line <a class="el" href="uspoof_8h_source.html#l00381">381</a> of file <a class="el" href="uspoof_8h_source.html">uspoof.h</a>.</p>

</div>
</div>
<a class="anchor" id="a3f7748f370e9cc7f0c9a84eaa6165ddc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef enum <a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155">USpoofChecks</a>  <a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155">USpoofChecks</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enum for the kinds of checks that USpoofChecker can perform. </p>
<p>These enum values are used both to select the set of checks that will be performed, and to report results from the check function.</p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005551">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="a566eea7ea15156355085eb7ff5013852"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852">URestrictionLevel</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constants from UAX #39 for use in <a class="el" href="uspoof_8h.html#aa15e811b7f72face34a24012a02a945e">uspoof_setRestrictionLevel</a>, and for returned identifier restriction levels in check results. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005552">Stable:</a></b></dt><dd>ICU 51</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#aa15e811b7f72face34a24012a02a945e" title="Set the loosest restriction level allowed for strings. ">uspoof_setRestrictionLevel</a> </dd>
<dd>
<a class="el" href="uspoof_8h.html#a21bb11dd91519e5033d43036a30e4d67" title="Check the specified string for possible security issues. ">uspoof_check</a> </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a566eea7ea15156355085eb7ff5013852a262982208b89a2649d0f31ea48e46765"></a>USPOOF_ASCII&#160;</td><td class="fielddoc">
<p>All characters in the string are in the identifier profile and all characters in the string are in the ASCII range. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005589">Stable:</a></b></dt><dd>ICU 51 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a566eea7ea15156355085eb7ff5013852a0488c3736f11d8808ac55f72a3c6bde2"></a>USPOOF_SINGLE_SCRIPT_RESTRICTIVE&#160;</td><td class="fielddoc">
<p>The string classifies as ASCII-Only, or all characters in the string are in the identifier profile and the string is single-script, according to the definition in UTS 39 section 5.1. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005590">Stable:</a></b></dt><dd>ICU 53 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a566eea7ea15156355085eb7ff5013852af6dda9229dc422d3e8e41a23a1251060"></a>USPOOF_HIGHLY_RESTRICTIVE&#160;</td><td class="fielddoc">
<p>The string classifies as Single Script, or all characters in the string are in the identifier profile and the string is covered by any of the following sets of scripts, according to the definition in UTS 39 section 5.1: </p>
<ul>
<li>
Latin + Han + Bopomofo (or equivalently: Latn + Hanb) </li>
<li>
Latin + Han + Hiragana + Katakana (or equivalently: Latn + Jpan) </li>
<li>
Latin + Han + Hangul (or equivalently: Latn +Kore) </li>
</ul>
<p>This is the default restriction in ICU.</p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005591">Stable:</a></b></dt><dd>ICU 51 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a566eea7ea15156355085eb7ff5013852a06d4bf8b1c05dca9a9ec69a0e926e117"></a>USPOOF_MODERATELY_RESTRICTIVE&#160;</td><td class="fielddoc">
<p>The string classifies as Highly Restrictive, or all characters in the string are in the identifier profile and the string is covered by Latin and any one other Recommended or Aspirational script, except Cyrillic, Greek, and Cherokee. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005592">Stable:</a></b></dt><dd>ICU 51 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a566eea7ea15156355085eb7ff5013852af1e2132b4067af2aec3460c679f7e598"></a>USPOOF_MINIMALLY_RESTRICTIVE&#160;</td><td class="fielddoc">
<p>All characters in the string are in the identifier profile. </p>
<p>Allow arbitrary mixtures of scripts.</p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005593">Stable:</a></b></dt><dd>ICU 51 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a566eea7ea15156355085eb7ff5013852af8c3d86392c0d18d51b05390483a036e"></a>USPOOF_UNRESTRICTIVE&#160;</td><td class="fielddoc">
<p>Any valid identifiers, including characters outside of the Identifier Profile. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005594">Stable:</a></b></dt><dd>ICU 51 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a566eea7ea15156355085eb7ff5013852a900ac32a2451a70f42c424445f0f3b6f"></a>USPOOF_RESTRICTION_LEVEL_MASK&#160;</td><td class="fielddoc">
<p>Mask for selecting the Restriction Level bits from the return value of <a class="el" href="uspoof_8h.html#a21bb11dd91519e5033d43036a30e4d67">uspoof_check</a>. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005595">Stable:</a></b></dt><dd>ICU 53 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a566eea7ea15156355085eb7ff5013852a3744a1ffbcb1b9c30f484034d0843025"></a>USPOOF_UNDEFINED_RESTRICTIVE&#160;</td><td class="fielddoc">
<p>An undefined restriction level. </p>
<dl class="internal"><dt><b><a class="el" href="internal.html#_internal000489">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. </dd></dl>
</td></tr>
</table>

<p>Definition at line <a class="el" href="uspoof_8h_source.html#l00524">524</a> of file <a class="el" href="uspoof_8h_source.html">uspoof.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155">USpoofChecks</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enum for the kinds of checks that USpoofChecker can perform. </p>
<p>These enum values are used both to select the set of checks that will be performed, and to report results from the check function.</p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005551">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155adc4588fd7ff74c3a6e5cc91d3a6f5d60"></a>USPOOF_SINGLE_SCRIPT_CONFUSABLE&#160;</td><td class="fielddoc">
<p>When performing the two-string <a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6">uspoof_areConfusable</a> test, this flag in the return value indicates that the two strings are visually confusable and that they are from the same script, according to UTS 39 section 4. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6" title="Check the whether two specified strings are visually confusable. ">uspoof_areConfusable</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005582">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155a76a60327ab14a68342242aae60340106"></a>USPOOF_MIXED_SCRIPT_CONFUSABLE&#160;</td><td class="fielddoc">
<p>When performing the two-string <a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6">uspoof_areConfusable</a> test, this flag in the return value indicates that the two strings are visually confusable and that they are <b>not</b> from the same script, according to UTS 39 section 4. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6" title="Check the whether two specified strings are visually confusable. ">uspoof_areConfusable</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005583">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155abfc834ae8c881e54a7922648d5fecead"></a>USPOOF_WHOLE_SCRIPT_CONFUSABLE&#160;</td><td class="fielddoc">
<p>When performing the two-string <a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6">uspoof_areConfusable</a> test, this flag in the return value indicates that the two strings are visually confusable and that they are not from the same script but both of them are single-script strings, according to UTS 39 section 4. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6" title="Check the whether two specified strings are visually confusable. ">uspoof_areConfusable</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005584">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155a42d6035a2e66bfcf39b0e838168afdba"></a>USPOOF_CONFUSABLE&#160;</td><td class="fielddoc">
<p>Enable this flag in <a class="el" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab">uspoof_setChecks</a> to turn on all types of confusables. </p>
<p>You may set the checks to some subset of SINGLE_SCRIPT_CONFUSABLE, MIXED_SCRIPT_CONFUSABLE, or WHOLE_SCRIPT_CONFUSABLE to make <a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6">uspoof_areConfusable</a> return only those types of confusables.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6" title="Check the whether two specified strings are visually confusable. ">uspoof_areConfusable</a> </dd>
<dd>
<a class="el" href="uspoof_8h.html#ab5d4f956191fe5395bdaeb57e8a667f9" title="Get the &quot;skeleton&quot; for an identifier. ">uspoof_getSkeleton</a> </dd></dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000087">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155ae65a72b384e76f7ac1cc4df1decd8057"></a>USPOOF_ANY_CASE&#160;</td><td class="fielddoc">
<p>This flag is deprecated and no longer affects the behavior of SpoofChecker. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000435">Deprecated:</a></b></dt><dd>ICU 58 Any case confusable mappings were removed from UTS 39; the corresponding ICU API was deprecated. </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155a1977848d7ccac6f3640fa684b452f69a"></a>USPOOF_RESTRICTION_LEVEL&#160;</td><td class="fielddoc">
<p>Check that an identifier is no looser than the specified RestrictionLevel. </p>
<p>The default if <a class="el" href="uspoof_8h.html#aa15e811b7f72face34a24012a02a945e">uspoof_setRestrictionLevel</a> is not called is HIGHLY_RESTRICTIVE.</p>
<p>If USPOOF_AUX_INFO is enabled the actual restriction level of the identifier being tested will also be returned by <a class="el" href="uspoof_8h.html#a21bb11dd91519e5033d43036a30e4d67" title="Check the specified string for possible security issues. ">uspoof_check()</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852" title="Constants from UAX #39 for use in uspoof_setRestrictionLevel, and for returned identifier restriction...">URestrictionLevel</a> </dd>
<dd>
<a class="el" href="uspoof_8h.html#aa15e811b7f72face34a24012a02a945e" title="Set the loosest restriction level allowed for strings. ">uspoof_setRestrictionLevel</a> </dd>
<dd>
<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155aa7307e5bdc933ceba391fbbc22b382ab" title="Enable the return of auxillary (non-error) information in the upper bits of the check results value...">USPOOF_AUX_INFO</a></dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005585">Stable:</a></b></dt><dd>ICU 51 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155a68b7d294c1566c1f4a74e2b3a952a138"></a>USPOOF_SINGLE_SCRIPT&#160;</td><td class="fielddoc">
<p>Check that an identifier contains only characters from a single script (plus chars from the common and inherited scripts.) Applies to checks of a single identifier check only. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000436">Deprecated:</a></b></dt><dd>ICU 51 Use RESTRICTION_LEVEL instead. </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155a7324a51073ca18279da8706d8c21ee0c"></a>USPOOF_INVISIBLE&#160;</td><td class="fielddoc">
<p>Check an identifier for the presence of invisible characters, such as zero-width spaces, or character sequences that are likely not to display, such as multiple occurrences of the same non-spacing mark. </p>
<p>This check does not test the input string as a whole for conformance to any particular syntax for identifiers. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155a3f3e13d5b54cc156864a2aca221b3888"></a>USPOOF_CHAR_LIMIT&#160;</td><td class="fielddoc">
<p>Check that an identifier contains only characters from a specified set of acceptable characters. </p>
<p>See <a class="el" href="uspoof_8h.html#a39e66376b958996302cd4a53b16c0548">uspoof_setAllowedChars</a> and <a class="el" href="uspoof_8h.html#a51e28e636fbb5707f66ef4d4caff5de0">uspoof_setAllowedLocales</a>. Note that a string that fails this check will also fail the <a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a1977848d7ccac6f3640fa684b452f69a">USPOOF_RESTRICTION_LEVEL</a> check. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155a0fbfe4596de0672faf4f0d4f01a823f6"></a>USPOOF_MIXED_NUMBERS&#160;</td><td class="fielddoc">
<p>Check that an identifier does not mix numbers from different numbering systems. </p>
<p>For more information, see UTS 39 section 5.3.</p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005586">Stable:</a></b></dt><dd>ICU 51 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155a4450adc366e2178c451d89b2ea244123"></a>USPOOF_ALL_CHECKS&#160;</td><td class="fielddoc">
<p>Enable all spoof checks. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005587">Stable:</a></b></dt><dd>ICU 4.6 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155aa7307e5bdc933ceba391fbbc22b382ab"></a>USPOOF_AUX_INFO&#160;</td><td class="fielddoc">
<p>Enable the return of auxillary (non-error) information in the upper bits of the check results value. </p>
<p>If this "check" is not enabled, the results of <a class="el" href="uspoof_8h.html#a21bb11dd91519e5033d43036a30e4d67">uspoof_check</a> will be zero when an identifier passes all of the enabled checks.</p>
<p>If this "check" is enabled, (<a class="el" href="uspoof_8h.html#a21bb11dd91519e5033d43036a30e4d67" title="Check the specified string for possible security issues. ">uspoof_check()</a> &amp; <a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a4450adc366e2178c451d89b2ea244123">USPOOF_ALL_CHECKS</a>) will be zero when an identifier passes all checks.</p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005588">Stable:</a></b></dt><dd>ICU 51 </dd></dl>
</td></tr>
</table>

<p>Definition at line <a class="el" href="uspoof_8h_source.html#l00391">391</a> of file <a class="el" href="uspoof_8h_source.html">uspoof.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="abf7d471023c957586eec6c790f6436e6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2 uspoof_areConfusable </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</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>id1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>length1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td>
          <td class="paramname"><em>id2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>length2</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>Check the whether two specified strings are visually confusable. </p>
<p>If the strings are confusable, the return value will be nonzero, as long as <a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a42d6035a2e66bfcf39b0e838168afdba">USPOOF_CONFUSABLE</a> was enabled in <a class="el" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab" title="Specify the bitmask of checks that will be performed by uspoof_check. ">uspoof_setChecks()</a>.</p>
<p>The bits in the return value correspond to flags for each of the classes of confusables applicable to the two input strings. According to UTS 39 section 4, the possible flags are:</p>
<ul>
<li>
<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155adc4588fd7ff74c3a6e5cc91d3a6f5d60">USPOOF_SINGLE_SCRIPT_CONFUSABLE</a> </li>
<li>
<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a76a60327ab14a68342242aae60340106">USPOOF_MIXED_SCRIPT_CONFUSABLE</a> </li>
<li>
<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155abfc834ae8c881e54a7922648d5fecead">USPOOF_WHOLE_SCRIPT_CONFUSABLE</a> </li>
</ul>
<p>If one or more of the above flags were not listed in <a class="el" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab" title="Specify the bitmask of checks that will be performed by uspoof_check. ">uspoof_setChecks()</a>, this function will never report that class of confusable. The check <a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a42d6035a2e66bfcf39b0e838168afdba">USPOOF_CONFUSABLE</a> enables all three flags.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">id1</td><td>The first of the two identifiers to be compared for confusability. The strings are in UTF-16 format. </td></tr>
    <tr><td class="paramname">length1</td><td>the length of the first identifer, expressed in 16 bit UTF-16 code units, or -1 if the string is nul terminated. </td></tr>
    <tr><td class="paramname">id2</td><td>The second of the two identifiers to be compared for confusability. The identifiers are in UTF-16 format. </td></tr>
    <tr><td class="paramname">length2</td><td>The length of the second identifiers, expressed in 16 bit UTF-16 code units, or -1 if the string is nul terminated. </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if an error occurred while attempting to perform the check. Confusability of the identifiers is not reported here, but through this function's return value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An integer value with bit(s) set corresponding to the type of confusability found, as defined by enum USpoofChecks. Zero is returned if the identifiers are not confusable.</dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005571">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="aed5fb4ecf6a816ea23874f35514e7553"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2 uspoof_areConfusableUnicodeString </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classicu_1_1UnicodeString.html">icu::UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>s1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classicu_1_1UnicodeString.html">icu::UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>s2</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>A version of <a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6">uspoof_areConfusable</a> accepting UnicodeStrings. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">s1</td><td>The first of the two identifiers to be compared for confusability. The strings are in UTF-8 format. </td></tr>
    <tr><td class="paramname">s2</td><td>The second of the two identifiers to be compared for confusability. The strings are in UTF-8 format. </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if an error occurred while attempting to perform the check. Confusability of the identifiers is not reported here, but through this function's return value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An integer value with bit(s) set corresponding to the type of confusability found, as defined by enum USpoofChecks. Zero is returned if the identifiers are not confusable.</dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005573">Stable:</a></b></dt><dd>ICU 4.2</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6" title="Check the whether two specified strings are visually confusable. ">uspoof_areConfusable</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aa1a1840ebe1d9b90429faed50063b63e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2 uspoof_areConfusableUTF8 </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>id1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>length1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>id2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>length2</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>A version of <a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6">uspoof_areConfusable</a> accepting strings in UTF-8 format. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">id1</td><td>The first of the two identifiers to be compared for confusability. The strings are in UTF-8 format. </td></tr>
    <tr><td class="paramname">length1</td><td>the length of the first identifiers, in bytes, or -1 if the string is nul terminated. </td></tr>
    <tr><td class="paramname">id2</td><td>The second of the two identifiers to be compared for confusability. The strings are in UTF-8 format. </td></tr>
    <tr><td class="paramname">length2</td><td>The length of the second string in bytes, or -1 if the string is nul terminated. </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if an error occurred while attempting to perform the check. Confusability of the strings is not reported here, but through this function's return value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An integer value with bit(s) set corresponding to the type of confusability found, as defined by enum USpoofChecks. Zero is returned if the strings are not confusable.</dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005572">Stable:</a></b></dt><dd>ICU 4.2</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6" title="Check the whether two specified strings are visually confusable. ">uspoof_areConfusable</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a21bb11dd91519e5033d43036a30e4d67"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2 uspoof_check </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</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>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>position</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>Check the specified string for possible security issues. </p>
<p>The text to be checked will typically be an identifier of some sort. The set of checks to be performed is specified with <a class="el" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab" title="Specify the bitmask of checks that will be performed by uspoof_check. ">uspoof_setChecks()</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Consider using the newer API, <a class="el" href="uspoof_8h.html#ae24189f414f6c0c5dad07a8afe840107">uspoof_check2</a>, instead. The newer API exposes additional information from the check procedure and is otherwise identical to this method.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">id</td><td>The identifier to be checked for possible security issues, in UTF-16 format. </td></tr>
    <tr><td class="paramname">length</td><td>the length of the string to be checked, expressed in 16 bit UTF-16 code units, or -1 if the string is zero terminated. </td></tr>
    <tr><td class="paramname">position</td><td>Deprecated in ICU 51. Always returns zero. Originally, an out parameter for the index of the first string position that failed a check. This parameter may be NULL. </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if an error occurred while attempting to perform the check. Spoofing or security issues detected with the input string are not reported here, but through the function's return value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An integer value with bits set for any potential security or spoofing issues detected. The bits are defined by enum USpoofChecks. (returned_value &amp; USPOOF_ALL_CHECKS) will be zero if the input string passes all of the enabled checks. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#ae24189f414f6c0c5dad07a8afe840107" title="Check the specified string for possible security issues. ">uspoof_check2</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005568">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="ae24189f414f6c0c5dad07a8afe840107"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a41691e68155dca13bc1f020fa30dac82">U_DRAFT</a> int32_t U_EXPORT2 uspoof_check2 </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</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>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a> *&#160;</td>
          <td class="paramname"><em>checkResult</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>Check the specified string for possible security issues. </p>
<p>The text to be checked will typically be an identifier of some sort. The set of checks to be performed is specified with <a class="el" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab" title="Specify the bitmask of checks that will be performed by uspoof_check. ">uspoof_setChecks()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">id</td><td>The identifier to be checked for possible security issues, in UTF-16 format. </td></tr>
    <tr><td class="paramname">length</td><td>the length of the string to be checked, or -1 if the string is zero terminated. </td></tr>
    <tr><td class="paramname">checkResult</td><td>An instance of USpoofCheckResult to be filled with details about the identifier. Can be NULL. </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if an error occurred while attempting to perform the check. Spoofing or security issues detected with the input string are not reported here, but through the function's return value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An integer value with bits set for any potential security or spoofing issues detected. The bits are defined by enum USpoofChecks. (returned_value &amp; USPOOF_ALL_CHECKS) will be zero if the input string passes all of the enabled checks. Any information in this bitmask will be consistent with the information saved in the optional checkResult parameter. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#af815a3ac7c924bc79058029445069fda" title="Create a USpoofCheckResult, used by the uspoof_check2 class of functions to return information about ...">uspoof_openCheckResult</a> </dd>
<dd>
<a class="el" href="uspoof_8h.html#a269cf650aa53dd842a6d5c82b3ae2c65" title="Check the specified string for possible security issues. ">uspoof_check2UTF8</a> </dd>
<dd>
<a class="el" href="uspoof_8h.html#a8d6637ca53487880711d714e1181ca7c" title="Check the specified string for possible security issues. ">uspoof_check2UnicodeString</a> </dd></dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000078">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>

</div>
</div>
<a class="anchor" id="a8d6637ca53487880711d714e1181ca7c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a41691e68155dca13bc1f020fa30dac82">U_DRAFT</a> int32_t U_EXPORT2 uspoof_check2UnicodeString </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classicu_1_1UnicodeString.html">icu::UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a> *&#160;</td>
          <td class="paramname"><em>checkResult</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>Check the specified string for possible security issues. </p>
<p>The text to be checked will typically be an identifier of some sort. The set of checks to be performed is specified with <a class="el" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab" title="Specify the bitmask of checks that will be performed by uspoof_check. ">uspoof_setChecks()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">id</td><td>A identifier to be checked for possible security issues. </td></tr>
    <tr><td class="paramname">checkResult</td><td>An instance of USpoofCheckResult to be filled with details about the identifier. Can be NULL. </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if an error occurred while attempting to perform the check. Spoofing or security issues detected with the input string are not reported here, but through the function's return value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An integer value with bits set for any potential security or spoofing issues detected. The bits are defined by enum USpoofChecks. (returned_value &amp; USPOOF_ALL_CHECKS) will be zero if the input string passes all of the enabled checks. Any information in this bitmask will be consistent with the information saved in the optional checkResult parameter. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#af815a3ac7c924bc79058029445069fda" title="Create a USpoofCheckResult, used by the uspoof_check2 class of functions to return information about ...">uspoof_openCheckResult</a> </dd>
<dd>
<a class="el" href="uspoof_8h.html#ae24189f414f6c0c5dad07a8afe840107" title="Check the specified string for possible security issues. ">uspoof_check2</a> </dd>
<dd>
<a class="el" href="uspoof_8h.html#a269cf650aa53dd842a6d5c82b3ae2c65" title="Check the specified string for possible security issues. ">uspoof_check2UTF8</a> </dd></dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000080">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>

</div>
</div>
<a class="anchor" id="a269cf650aa53dd842a6d5c82b3ae2c65"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a41691e68155dca13bc1f020fa30dac82">U_DRAFT</a> int32_t U_EXPORT2 uspoof_check2UTF8 </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a> *&#160;</td>
          <td class="paramname"><em>checkResult</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>Check the specified string for possible security issues. </p>
<p>The text to be checked will typically be an identifier of some sort. The set of checks to be performed is specified with <a class="el" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab" title="Specify the bitmask of checks that will be performed by uspoof_check. ">uspoof_setChecks()</a>.</p>
<p>This version of <a class="el" href="uspoof_8h.html#a21bb11dd91519e5033d43036a30e4d67">uspoof_check</a> accepts a USpoofCheckResult, which returns additional information about the identifier. For more information, see <a class="el" href="uspoof_8h.html#af815a3ac7c924bc79058029445069fda">uspoof_openCheckResult</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">id</td><td>A identifier to be checked for possible security issues, in UTF8 format. </td></tr>
    <tr><td class="paramname">length</td><td>the length of the string to be checked, or -1 if the string is zero terminated. </td></tr>
    <tr><td class="paramname">checkResult</td><td>An instance of USpoofCheckResult to be filled with details about the identifier. Can be NULL. </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if an error occurred while attempting to perform the check. Spoofing or security issues detected with the input string are not reported here, but through the function's return value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An integer value with bits set for any potential security or spoofing issues detected. The bits are defined by enum USpoofChecks. (returned_value &amp; USPOOF_ALL_CHECKS) will be zero if the input string passes all of the enabled checks. Any information in this bitmask will be consistent with the information saved in the optional checkResult parameter. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#af815a3ac7c924bc79058029445069fda" title="Create a USpoofCheckResult, used by the uspoof_check2 class of functions to return information about ...">uspoof_openCheckResult</a> </dd>
<dd>
<a class="el" href="uspoof_8h.html#ae24189f414f6c0c5dad07a8afe840107" title="Check the specified string for possible security issues. ">uspoof_check2</a> </dd>
<dd>
<a class="el" href="uspoof_8h.html#a8d6637ca53487880711d714e1181ca7c" title="Check the specified string for possible security issues. ">uspoof_check2UnicodeString</a> </dd></dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000079">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>

</div>
</div>
<a class="anchor" id="ae165c7f55213376cda5274045a4cd888"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2 uspoof_checkUnicodeString </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classicu_1_1UnicodeString.html">icu::UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>position</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>Check the specified string for possible security issues. </p>
<p>The text to be checked will typically be an identifier of some sort. The set of checks to be performed is specified with <a class="el" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab" title="Specify the bitmask of checks that will be performed by uspoof_check. ">uspoof_setChecks()</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Consider using the newer API, <a class="el" href="uspoof_8h.html#a8d6637ca53487880711d714e1181ca7c">uspoof_check2UnicodeString</a>, instead. The newer API exposes additional information from the check procedure and is otherwise identical to this method.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">id</td><td>A identifier to be checked for possible security issues. </td></tr>
    <tr><td class="paramname">position</td><td>Deprecated in ICU 51. Always returns zero. Originally, an out parameter for the index of the first string position that failed a check. This parameter may be NULL. </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if an error occurred while attempting to perform the check. Spoofing or security issues detected with the input string are not reported here, but through the function's return value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An integer value with bits set for any potential security or spoofing issues detected. The bits are defined by enum USpoofChecks. (returned_value &amp; USPOOF_ALL_CHECKS) will be zero if the input string passes all of the enabled checks. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#a8d6637ca53487880711d714e1181ca7c" title="Check the specified string for possible security issues. ">uspoof_check2UnicodeString</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005570">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a14443b1ccec5e500b1ce0c0b259b313a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2 uspoof_checkUTF8 </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>position</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>Check the specified string for possible security issues. </p>
<p>The text to be checked will typically be an identifier of some sort. The set of checks to be performed is specified with <a class="el" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab" title="Specify the bitmask of checks that will be performed by uspoof_check. ">uspoof_setChecks()</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Consider using the newer API, <a class="el" href="uspoof_8h.html#a269cf650aa53dd842a6d5c82b3ae2c65">uspoof_check2UTF8</a>, instead. The newer API exposes additional information from the check procedure and is otherwise identical to this method.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">id</td><td>A identifier to be checked for possible security issues, in UTF8 format. </td></tr>
    <tr><td class="paramname">length</td><td>the length of the string to be checked, or -1 if the string is zero terminated. </td></tr>
    <tr><td class="paramname">position</td><td>Deprecated in ICU 51. Always returns zero. Originally, an out parameter for the index of the first string position that failed a check. This parameter may be NULL. </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if an error occurred while attempting to perform the check. Spoofing or security issues detected with the input string are not reported here, but through the function's return value. If the input contains invalid UTF-8 sequences, a status of U_INVALID_CHAR_FOUND will be returned. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An integer value with bits set for any potential security or spoofing issues detected. The bits are defined by enum USpoofChecks. (returned_value &amp; USPOOF_ALL_CHECKS) will be zero if the input string passes all of the enabled checks. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#a269cf650aa53dd842a6d5c82b3ae2c65" title="Check the specified string for possible security issues. ">uspoof_check2UTF8</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005569">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a5a6a3fff21c2aa515d3e16da47609a48"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a>* uspoof_clone </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</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>Clone a Spoof Checker. </p>
<p>The clone will be set to perform the same checks as the original source.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The source USpoofChecker </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if this function encounters a problem. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005557">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="ab63b4f7780b1d6c57a31624ad5c3db41"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void uspoof_close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Close a Spoof Checker, freeing any memory that was being held by its implementation. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005556">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="aea80fdd47684dca9a6c9378e981e17c9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a41691e68155dca13bc1f020fa30dac82">U_DRAFT</a> void U_EXPORT2 uspoof_closeCheckResult </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a> *&#160;</td>
          <td class="paramname"><em>checkResult</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Close a USpoofCheckResult, freeing any memory that was being held by its implementation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">checkResult</td><td>The instance of USpoofCheckResult to close </td></tr>
  </table>
  </dd>
</dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000082">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>

</div>
</div>
<a class="anchor" id="afcb9c0b2ba947138032ab2ee53004485"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> const <a class="el" href="ucnv_8h.html#adce3fef7c15d7c78196bf977ac96ec9c">USet</a>* U_EXPORT2 uspoof_getAllowedChars </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</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>Get a USet for the characters permitted in an identifier. </p>
<p>This corresponds to the limits imposed by the Set Allowed Characters functions. Limitations imposed by other checks will not be reflected in the set returned by this function.</p>
<p>The returned set will be frozen, meaning that it cannot be modified by the caller.</p>
<p>Ownership of the returned set remains with the Spoof Detector. The returned set will become invalid if the spoof detector is closed, or if a new set of allowed characters is specified.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if this function encounters a problem. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A USet containing the characters that are permitted by the USPOOF_CHAR_LIMIT test. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005565">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a94abb819283a77089262185711d855e9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> const char* U_EXPORT2 uspoof_getAllowedLocales </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</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>Get a list of locales for the scripts that are acceptable in strings to be checked. </p>
<p>If no limitations on scripts have been specified, an empty string will be returned.</p>
<p><a class="el" href="uspoof_8h.html#a39e66376b958996302cd4a53b16c0548" title="Limit the acceptable characters to those specified by a Unicode Set. ">uspoof_setAllowedChars()</a> will reset the list of allowed to be empty.</p>
<p>The format of the returned list is the same as that supplied to <a class="el" href="uspoof_8h.html#a51e28e636fbb5707f66ef4d4caff5de0" title="Limit characters that are acceptable in identifiers being checked to those normally used with the lan...">uspoof_setAllowedLocales()</a>, but returned list may not be identical to the originally specified string; the string may be reformatted, and information other than languages from the originally specified locales may be omitted.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if this function encounters a problem. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A string containing a list of locales corresponding to the acceptable scripts, formatted like an HTTP Accept Language value.</dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005563">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a5a5b3dff0328db93ac6494f8de2a612b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> const <a class="el" href="classicu_1_1UnicodeSet.html">icu::UnicodeSet</a>* U_EXPORT2 uspoof_getAllowedUnicodeSet </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</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>Get a UnicodeSet for the characters permitted in an identifier. </p>
<p>This corresponds to the limits imposed by the Set Allowed Characters / UnicodeSet functions. Limitations imposed by other checks will not be reflected in the set returned by this function.</p>
<p>The returned set will be frozen, meaning that it cannot be modified by the caller.</p>
<p>Ownership of the returned set remains with the Spoof Detector. The returned set will become invalid if the spoof detector is closed, or if a new set of allowed characters is specified.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if this function encounters a problem. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A UnicodeSet containing the characters that are permitted by the USPOOF_CHAR_LIMIT test. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005567">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a109dc9f022e1c9a8044684c553ce9b66"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="uversion_8h.html#a3da1f00f3b02976ac53c014a3e4c0933">U_NAMESPACE_END</a> <a class="el" href="umachine_8h.html#a41691e68155dca13bc1f020fa30dac82">U_DRAFT</a> int32_t U_EXPORT2 uspoof_getCheckResultChecks </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a> *&#160;</td>
          <td class="paramname"><em>checkResult</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>Indicates which of the spoof check(s) have failed. </p>
<p>The value is a bitwise OR of the constants for the tests in question: USPOOF_RESTRICTION_LEVEL, USPOOF_CHAR_LIMIT, and so on.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">checkResult</td><td>The instance of USpoofCheckResult created by <a class="el" href="uspoof_8h.html#af815a3ac7c924bc79058029445069fda">uspoof_openCheckResult</a> </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if an error occurred. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An integer value with bits set for any potential security or spoofing issues detected. The bits are defined by enum USpoofChecks. (returned_value &amp; USPOOF_ALL_CHECKS) will be zero if the input string passes all of the enabled checks. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab" title="Specify the bitmask of checks that will be performed by uspoof_check. ">uspoof_setChecks</a> </dd></dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000084">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>

</div>
</div>
<a class="anchor" id="a9e02e6cff6f2f878a10f047a2a58186b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a41691e68155dca13bc1f020fa30dac82">U_DRAFT</a> const <a class="el" href="ucnv_8h.html#adce3fef7c15d7c78196bf977ac96ec9c">USet</a>* U_EXPORT2 uspoof_getCheckResultNumerics </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a> *&#160;</td>
          <td class="paramname"><em>checkResult</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>Gets the set of numerics found in the string, if the USPOOF_MIXED_NUMBERS check was enabled; otherwise, undefined. </p>
<p>The set will contain the zero digit from each decimal number system found in the input string. Ownership of the returned USet remains with the USpoofCheckResult. The USet will be free'd when <a class="el" href="uspoof_8h.html#aea80fdd47684dca9a6c9378e981e17c9">uspoof_closeCheckResult</a> is called.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">checkResult</td><td>The instance of USpoofCheckResult created by <a class="el" href="uspoof_8h.html#af815a3ac7c924bc79058029445069fda">uspoof_openCheckResult</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The set of numerics contained in the USpoofCheckResult </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">status</td><td>The error code, set if an error occurred. </td></tr>
  </table>
  </dd>
</dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000086">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>

</div>
</div>
<a class="anchor" id="ac1350f398faf02177b323bf21a8ffa1e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a41691e68155dca13bc1f020fa30dac82">U_DRAFT</a> <a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852">URestrictionLevel</a> U_EXPORT2 uspoof_getCheckResultRestrictionLevel </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a> *&#160;</td>
          <td class="paramname"><em>checkResult</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>Gets the restriction level that the text meets, if the USPOOF_RESTRICTION_LEVEL check was enabled; otherwise, undefined. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">checkResult</td><td>The instance of USpoofCheckResult created by <a class="el" href="uspoof_8h.html#af815a3ac7c924bc79058029445069fda">uspoof_openCheckResult</a> </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if an error occurred. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The restriction level contained in the USpoofCheckResult </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#aa15e811b7f72face34a24012a02a945e" title="Set the loosest restriction level allowed for strings. ">uspoof_setRestrictionLevel</a> </dd></dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000085">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>

</div>
</div>
<a class="anchor" id="ae1a26eb3a73953e1fea08af8270f5252"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2 uspoof_getChecks </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</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>Get the set of checks that this Spoof Checker has been configured to perform. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if this function encounters a problem. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The set of checks that this spoof checker will perform. The value is a bit set, obtained by OR-ing together values from enum USpoofChecks. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005559">Stable:</a></b></dt><dd>ICU 4.2</dd></dl>

</div>
</div>
<a class="anchor" id="a238dd6a2e20212b3a14c392355ecc62d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> const <a class="el" href="ucnv_8h.html#adce3fef7c15d7c78196bf977ac96ec9c">USet</a>* U_EXPORT2 uspoof_getInclusionSet </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the set of Candidate Characters for Inclusion in Identifiers, as defined in <a href="http://unicode.org/Public/security/latest/xidmodifications.txt">http://unicode.org/Public/security/latest/xidmodifications.txt</a> and documented in <a href="http://www.unicode.org/reports/tr39/,">http://www.unicode.org/reports/tr39/,</a> Unicode Security Mechanisms. </p>
<p>The returned set is frozen. Ownership of the set remains with the ICU library; it must not be deleted by the caller.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">status</td><td>The error code, set if a problem occurs while creating the set.</td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005577">Stable:</a></b></dt><dd>ICU 51 </dd></dl>

</div>
</div>
<a class="anchor" id="a244a3f41ef710e3689a9bb741638a37f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> const <a class="el" href="classicu_1_1UnicodeSet.html">icu::UnicodeSet</a>* U_EXPORT2 uspoof_getInclusionUnicodeSet </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the set of Candidate Characters for Inclusion in Identifiers, as defined in <a href="http://unicode.org/Public/security/latest/xidmodifications.txt">http://unicode.org/Public/security/latest/xidmodifications.txt</a> and documented in <a href="http://www.unicode.org/reports/tr39/,">http://www.unicode.org/reports/tr39/,</a> Unicode Security Mechanisms. </p>
<p>The returned set is frozen. Ownership of the set remains with the ICU library; it must not be deleted by the caller.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">status</td><td>The error code, set if a problem occurs while creating the set.</td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005579">Stable:</a></b></dt><dd>ICU 51 </dd></dl>

</div>
</div>
<a class="anchor" id="a708cce542934ad1d604518ed48162bbc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> const <a class="el" href="ucnv_8h.html#adce3fef7c15d7c78196bf977ac96ec9c">USet</a>* U_EXPORT2 uspoof_getRecommendedSet </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the set of characters from Recommended Scripts for Inclusion in Identifiers, as defined in <a href="http://unicode.org/Public/security/latest/xidmodifications.txt">http://unicode.org/Public/security/latest/xidmodifications.txt</a> and documented in <a href="http://www.unicode.org/reports/tr39/,">http://www.unicode.org/reports/tr39/,</a> Unicode Security Mechanisms. </p>
<p>The returned set is frozen. Ownership of the set remains with the ICU library; it must not be deleted by the caller.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">status</td><td>The error code, set if a problem occurs while creating the set.</td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005578">Stable:</a></b></dt><dd>ICU 51 </dd></dl>

</div>
</div>
<a class="anchor" id="aa74301abff43c60ecbdd1e8229127250"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> const <a class="el" href="classicu_1_1UnicodeSet.html">icu::UnicodeSet</a>* U_EXPORT2 uspoof_getRecommendedUnicodeSet </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the set of characters from Recommended Scripts for Inclusion in Identifiers, as defined in <a href="http://unicode.org/Public/security/latest/xidmodifications.txt">http://unicode.org/Public/security/latest/xidmodifications.txt</a> and documented in <a href="http://www.unicode.org/reports/tr39/,">http://www.unicode.org/reports/tr39/,</a> Unicode Security Mechanisms. </p>
<p>The returned set is frozen. Ownership of the set remains with the ICU library; it must not be deleted by the caller.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">status</td><td>The error code, set if a problem occurs while creating the set.</td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005580">Stable:</a></b></dt><dd>ICU 51 </dd></dl>

</div>
</div>
<a class="anchor" id="a2a7ef2dca2d8d13cbedbda6d0a975cf3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> <a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852">URestrictionLevel</a> U_EXPORT2 uspoof_getRestrictionLevel </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the Restriction Level that will be tested if the checks include <a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a1977848d7ccac6f3640fa684b452f69a">USPOOF_RESTRICTION_LEVEL</a>. </p>
<dl class="section return"><dt>Returns</dt><dd>The restriction level </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852" title="Constants from UAX #39 for use in uspoof_setRestrictionLevel, and for returned identifier restriction...">URestrictionLevel</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005561">Stable:</a></b></dt><dd>ICU 51 </dd></dl>

</div>
</div>
<a class="anchor" id="ab5d4f956191fe5395bdaeb57e8a667f9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2 uspoof_getSkeleton </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>type</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>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>length</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="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>Get the "skeleton" for an identifier. </p>
<p>Skeletons are a transformation of the input identifier; Two identifiers are confusable if their skeletons are identical. See Unicode UAX #39 for additional information.</p>
<p>Using skeletons directly makes it possible to quickly check whether an identifier is confusable with any of some large set of existing identifiers, by creating an efficiently searchable collection of the skeletons.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">type</td><td>Deprecated in ICU 58. You may pass any number. Originally, controlled which of the Unicode confusable data tables to use. </td></tr>
    <tr><td class="paramname">id</td><td>The input identifier whose skeleton will be computed. </td></tr>
    <tr><td class="paramname">length</td><td>The length of the input identifier, expressed in 16 bit UTF-16 code units, or -1 if the string is zero terminated. </td></tr>
    <tr><td class="paramname">dest</td><td>The output buffer, to receive the skeleton string. </td></tr>
    <tr><td class="paramname">destCapacity</td><td>The length of the output buffer, in 16 bit units. The destCapacity may be zero, in which case the function will return the actual length of the skeleton. </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if an error occurred while attempting to perform the check. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The length of the skeleton string. The returned length is always that of the complete skeleton, even when the supplied buffer is too small (or of zero length)</dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005574">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6" title="Check the whether two specified strings are visually confusable. ">uspoof_areConfusable</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a964c0b001cb9a5b3ffb08ae1df8e7556"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="utypes_8h.html#ab9d90a30137b6ec046fe59e79b09745a">U_I18N_API</a> <a class="el" href="classicu_1_1UnicodeString.html">icu::UnicodeString</a>&amp; U_EXPORT2 uspoof_getSkeletonUnicodeString </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classicu_1_1UnicodeString.html">icu::UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classicu_1_1UnicodeString.html">icu::UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>dest</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>Get the "skeleton" for an identifier. </p>
<p>Skeletons are a transformation of the input identifier; Two identifiers are confusable if their skeletons are identical. See Unicode UAX #39 for additional information.</p>
<p>Using skeletons directly makes it possible to quickly check whether an identifier is confusable with any of some large set of existing identifiers, by creating an efficiently searchable collection of the skeletons.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker. </td></tr>
    <tr><td class="paramname">type</td><td>Deprecated in ICU 58. You may pass any number. Originally, controlled which of the Unicode confusable data tables to use. </td></tr>
    <tr><td class="paramname">id</td><td>The input identifier whose skeleton will be computed. </td></tr>
    <tr><td class="paramname">dest</td><td>The output identifier, to receive the skeleton string. </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if an error occurred while attempting to perform the check. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A reference to the destination (skeleton) string.</dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005576">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a4b9d8c2ad5a77b364fff8abe29d9e1db"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2 uspoof_getSkeletonUTF8 </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#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="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>Get the "skeleton" for an identifier. </p>
<p>Skeletons are a transformation of the input identifier; Two identifiers are confusable if their skeletons are identical. See Unicode UAX #39 for additional information.</p>
<p>Using skeletons directly makes it possible to quickly check whether an identifier is confusable with any of some large set of existing identifiers, by creating an efficiently searchable collection of the skeletons.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">type</td><td>Deprecated in ICU 58. You may pass any number. Originally, controlled which of the Unicode confusable data tables to use. </td></tr>
    <tr><td class="paramname">id</td><td>The UTF-8 format identifier whose skeleton will be computed. </td></tr>
    <tr><td class="paramname">length</td><td>The length of the input string, in bytes, or -1 if the string is zero terminated. </td></tr>
    <tr><td class="paramname">dest</td><td>The output buffer, to receive the skeleton string. </td></tr>
    <tr><td class="paramname">destCapacity</td><td>The length of the output buffer, in bytes. The destCapacity may be zero, in which case the function will return the actual length of the skeleton. </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if an error occurred while attempting to perform the check. Possible Errors include U_INVALID_CHAR_FOUND for invalid UTF-8 sequences, and U_BUFFER_OVERFLOW_ERROR if the destination buffer is too small to hold the complete skeleton. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The length of the skeleton string, in bytes. The returned length is always that of the complete skeleton, even when the supplied buffer is too small (or of zero length)</dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005575">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="afeff54ce632c1357e914334009becb62"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a>* uspoof_open </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a Unicode Spoof Checker, configured to perform all checks except for USPOOF_LOCALE_LIMIT and USPOOF_CHAR_LIMIT. </p>
<p>Note that additional checks may be added in the future, resulting in the changes to the default checking behavior.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">status</td><td>The error code, set if this function encounters a problem. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the newly created Spoof Checker </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005553">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="af815a3ac7c924bc79058029445069fda"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a41691e68155dca13bc1f020fa30dac82">U_DRAFT</a> <a class="el" href="uspoof_8h.html#ab4d0a57ce124af1f838739437aae20f9">USpoofCheckResult</a>* U_EXPORT2 uspoof_openCheckResult </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a USpoofCheckResult, used by the <a class="el" href="uspoof_8h.html#ae24189f414f6c0c5dad07a8afe840107">uspoof_check2</a> class of functions to return information about the identifier. </p>
<p>Information includes: </p><ul>
<li>
A bitmask of the checks that failed </li>
<li>
The identifier's restriction level (UTS 39 section 5.2) </li>
<li>
The set of numerics in the string (UTS 39 section 5.3) </li>
</ul>
<p>The data held in a USpoofCheckResult is cleared whenever it is passed into a new call of <a class="el" href="uspoof_8h.html#ae24189f414f6c0c5dad07a8afe840107">uspoof_check2</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">status</td><td>The error code, set if this function encounters a problem. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the newly created USpoofCheckResult </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#ae24189f414f6c0c5dad07a8afe840107" title="Check the specified string for possible security issues. ">uspoof_check2</a> </dd>
<dd>
<a class="el" href="uspoof_8h.html#a269cf650aa53dd842a6d5c82b3ae2c65" title="Check the specified string for possible security issues. ">uspoof_check2UTF8</a> </dd>
<dd>
<a class="el" href="uspoof_8h.html#a8d6637ca53487880711d714e1181ca7c" title="Check the specified string for possible security issues. ">uspoof_check2UnicodeString</a> </dd></dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000081">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 58 </dd></dl>

</div>
</div>
<a class="anchor" id="aa13a3dd9f673f9df317948eecab1a346"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a>* uspoof_openFromSerialized </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>pActualLength</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>Open a Spoof checker from its serialized form, stored in 32-bit-aligned memory. </p>
<p>Inverse of <a class="el" href="uspoof_8h.html#afffc5760a76109170f4a03ea57964e6c" title="Serialize the data for a spoof detector into a chunk of memory. ">uspoof_serialize()</a>. The memory containing the serialized data must remain valid and unchanged as long as the spoof checker, or any cloned copies of the spoof checker, are in use. Ownership of the memory remains with the caller. The spoof checker (and any clones) must be closed prior to deleting the serialized data.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>a pointer to 32-bit-aligned memory containing the serialized form of spoof data </td></tr>
    <tr><td class="paramname">length</td><td>the number of bytes available at data; can be more than necessary </td></tr>
    <tr><td class="paramname">pActualLength</td><td>receives the actual number of bytes at data taken up by the data; can be NULL </td></tr>
    <tr><td class="paramname">pErrorCode</td><td>ICU error code </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the spoof checker.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#afeff54ce632c1357e914334009becb62" title="Create a Unicode Spoof Checker, configured to perform all checks except for USPOOF_LOCALE_LIMIT and U...">uspoof_open</a> </dd>
<dd>
<a class="el" href="uspoof_8h.html#afffc5760a76109170f4a03ea57964e6c" title="Serialize the data for a spoof detector into a chunk of memory. ">uspoof_serialize</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005554">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a5332f41a9d13aec2cc115e6a24d08595"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a>* uspoof_openFromSource </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>confusables</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>confusablesLen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>confusablesWholeScript</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>confusablesWholeScriptLen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>errType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUParseError.html">UParseError</a> *&#160;</td>
          <td class="paramname"><em>pe</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>Open a Spoof Checker from the source form of the spoof data. </p>
<p>The input corresponds to the Unicode data file confusables.txt as described in Unicode UAX #39. The syntax of the source data is as described in UAX #39 for this file, and the content of this file is acceptable input.</p>
<p>The character encoding of the (char *) input text is UTF-8.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">confusables</td><td>a pointer to the confusable characters definitions, as found in file confusables.txt from unicode.org. </td></tr>
    <tr><td class="paramname">confusablesLen</td><td>The length of the confusables text, or -1 if the input string is zero terminated. </td></tr>
    <tr><td class="paramname">confusablesWholeScript</td><td>Deprecated in ICU 58. No longer used. </td></tr>
    <tr><td class="paramname">confusablesWholeScriptLen</td><td>Deprecated in ICU 58. No longer used. </td></tr>
    <tr><td class="paramname">errType</td><td>In the event of an error in the input, indicates which of the input files contains the error. The value is one of USPOOF_SINGLE_SCRIPT_CONFUSABLE or USPOOF_WHOLE_SCRIPT_CONFUSABLE, or zero if no errors are found. </td></tr>
    <tr><td class="paramname">pe</td><td>In the event of an error in the input, receives the position in the input text (line, offset) of the error. </td></tr>
    <tr><td class="paramname">status</td><td>an in/out ICU UErrorCode. Among the possible errors is U_PARSE_ERROR, which is used to report syntax errors in the input. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A spoof checker that uses the rules from the input files. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005555">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="afffc5760a76109170f4a03ea57964e6c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> int32_t U_EXPORT2 uspoof_serialize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>capacity</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>Serialize the data for a spoof detector into a chunk of memory. </p>
<p>The flattened spoof detection tables can later be used to efficiently instantiate a new Spoof Detector.</p>
<p>The serialized spoof checker includes only the data compiled from the Unicode data tables by <a class="el" href="uspoof_8h.html#a5332f41a9d13aec2cc115e6a24d08595" title="Open a Spoof Checker from the source form of the spoof data. ">uspoof_openFromSource()</a>; it does not include include any other state or configuration that may have been set.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>the Spoof Detector whose data is to be serialized. </td></tr>
    <tr><td class="paramname">data</td><td>a pointer to 32-bit-aligned memory to be filled with the data, can be NULL if capacity==0 </td></tr>
    <tr><td class="paramname">capacity</td><td>the number of bytes available at data, or 0 for preflighting </td></tr>
    <tr><td class="paramname">status</td><td>an in/out ICU UErrorCode; possible errors include:<ul>
<li>U_BUFFER_OVERFLOW_ERROR if the data storage block is too small for serialization</li>
<li>U_ILLEGAL_ARGUMENT_ERROR the data or capacity parameters are bad </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes written or needed for the spoof data</dd></dl>
<dl class="section see"><dt>See also</dt><dd>utrie2_openFromSerialized() </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005581">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a39e66376b958996302cd4a53b16c0548"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> void U_EXPORT2 uspoof_setAllowedChars </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="ucnv_8h.html#adce3fef7c15d7c78196bf977ac96ec9c">USet</a> *&#160;</td>
          <td class="paramname"><em>chars</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>Limit the acceptable characters to those specified by a Unicode Set. </p>
<p>Any previously specified character limit is is replaced by the new settings. This includes limits on characters that were set with the <a class="el" href="uspoof_8h.html#a51e28e636fbb5707f66ef4d4caff5de0" title="Limit characters that are acceptable in identifiers being checked to those normally used with the lan...">uspoof_setAllowedLocales()</a> function.</p>
<p>The USPOOF_CHAR_LIMIT test is automatically enabled for this USpoofChecker by this function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">chars</td><td>A Unicode Set containing the list of characters that are permitted. Ownership of the set remains with the caller. The incoming set is cloned by this function, so there are no restrictions on modifying or deleting the USet after calling this function. </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if this function encounters a problem. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005564">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a51e28e636fbb5707f66ef4d4caff5de0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> void U_EXPORT2 uspoof_setAllowedLocales </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>localesList</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>Limit characters that are acceptable in identifiers being checked to those normally used with the languages associated with the specified locales. </p>
<p>Any previously specified list of locales is replaced by the new settings.</p>
<p>A set of languages is determined from the locale(s), and from those a set of acceptable Unicode scripts is determined. Characters from this set of scripts, along with characters from the "common" and "inherited" Unicode Script categories will be permitted.</p>
<p>Supplying an empty string removes all restrictions; characters from any script will be allowed.</p>
<p>The <a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a3f3e13d5b54cc156864a2aca221b3888">USPOOF_CHAR_LIMIT</a> test is automatically enabled for this USpoofChecker when calling this function with a non-empty list of locales.</p>
<p>The Unicode Set of characters that will be allowed is accessible via the <a class="el" href="uspoof_8h.html#afcb9c0b2ba947138032ab2ee53004485" title="Get a USet for the characters permitted in an identifier. ">uspoof_getAllowedChars()</a> function. <a class="el" href="uspoof_8h.html#a51e28e636fbb5707f66ef4d4caff5de0" title="Limit characters that are acceptable in identifiers being checked to those normally used with the lan...">uspoof_setAllowedLocales()</a> will <em>replace</em> any previously applied set of allowed characters.</p>
<p>Adjustments, such as additions or deletions of certain classes of characters, can be made to the result of <a class="el" href="uspoof_8h.html#a51e28e636fbb5707f66ef4d4caff5de0" title="Limit characters that are acceptable in identifiers being checked to those normally used with the lan...">uspoof_setAllowedLocales()</a> by fetching the resulting set with <a class="el" href="uspoof_8h.html#afcb9c0b2ba947138032ab2ee53004485" title="Get a USet for the characters permitted in an identifier. ">uspoof_getAllowedChars()</a>, manipulating it with the Unicode Set API, then resetting the spoof detectors limits with <a class="el" href="uspoof_8h.html#a39e66376b958996302cd4a53b16c0548" title="Limit the acceptable characters to those specified by a Unicode Set. ">uspoof_setAllowedChars()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">localesList</td><td>A list list of locales, from which the language and associated script are extracted. The locales are comma-separated if there is more than one. White space may not appear within an individual locale, but is ignored otherwise. The locales are syntactically like those from the HTTP Accept-Language header. If the localesList is empty, no restrictions will be placed on the allowed characters.</td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if this function encounters a problem. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005562">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a41c7478556f4004eccea6fb3feca0bdb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> void U_EXPORT2 uspoof_setAllowedUnicodeSet </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classicu_1_1UnicodeSet.html">icu::UnicodeSet</a> *&#160;</td>
          <td class="paramname"><em>chars</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>Limit the acceptable characters to those specified by a Unicode Set. </p>
<p>Any previously specified character limit is is replaced by the new settings. This includes limits on characters that were set with the <a class="el" href="uspoof_8h.html#a51e28e636fbb5707f66ef4d4caff5de0" title="Limit characters that are acceptable in identifiers being checked to those normally used with the lan...">uspoof_setAllowedLocales()</a> function.</p>
<p>The USPOOF_CHAR_LIMIT test is automatically enabled for this USoofChecker by this function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">chars</td><td>A Unicode Set containing the list of characters that are permitted. Ownership of the set remains with the caller. The incoming set is cloned by this function, so there are no restrictions on modifying or deleting the UnicodeSet after calling this function. </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if this function encounters a problem. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005566">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a0d28ac52f3daa1317d3f3a6ee1324dab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> void U_EXPORT2 uspoof_setChecks </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>checks</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>Specify the bitmask of checks that will be performed by <a class="el" href="uspoof_8h.html#a21bb11dd91519e5033d43036a30e4d67">uspoof_check</a>. </p>
<p>Calling this method overwrites any checks that may have already been enabled. By default, all checks are enabled.</p>
<p>To enable specific checks and disable all others, the "whitelisted" checks should be ORed together. For example, to fail strings containing characters outside of the set specified by <a class="el" href="uspoof_8h.html#a39e66376b958996302cd4a53b16c0548">uspoof_setAllowedChars</a> and also strings that contain digits from mixed numbering systems:</p>
<pre>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;uspoof_setChecks(USPOOF_CHAR_LIMIT | USPOOF_MIXED_NUMBERS);</div></div><!-- fragment --> 
</pre><p>To disable specific checks and enable all others, the "blacklisted" checks should be ANDed away from ALL_CHECKS. For example, if you are not planning to use the <a class="el" href="uspoof_8h.html#abf7d471023c957586eec6c790f6436e6">uspoof_areConfusable</a> functionality, it is good practice to disable the CONFUSABLE check:</p>
<pre>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;uspoof_setChecks(USPOOF_ALL_CHECKS &amp; ~USPOOF_CONFUSABLE);</div></div><!-- fragment --> 
</pre><p>Note that methods such as <a class="el" href="uspoof_8h.html#a39e66376b958996302cd4a53b16c0548">uspoof_setAllowedChars</a>, <a class="el" href="uspoof_8h.html#a51e28e636fbb5707f66ef4d4caff5de0">uspoof_setAllowedLocales</a>, and <a class="el" href="uspoof_8h.html#aa15e811b7f72face34a24012a02a945e">uspoof_setRestrictionLevel</a> will enable certain checks when called. Those methods will OR the check they enable onto the existing bitmask specified by this method. For more details, see the documentation of those methods.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">checks</td><td>The set of checks that this spoof checker will perform. The value is a bit set, obtained by OR-ing together values from enum USpoofChecks. </td></tr>
    <tr><td class="paramname">status</td><td>The error code, set if this function encounters a problem. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005558">Stable:</a></b></dt><dd>ICU 4.2</dd></dl>

</div>
</div>
<a class="anchor" id="aa15e811b7f72face34a24012a02a945e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#af3e3799716eaa41e3f49c7bf18c62b98">U_STABLE</a> void U_EXPORT2 uspoof_setRestrictionLevel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&#160;</td>
          <td class="paramname"><em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852">URestrictionLevel</a>&#160;</td>
          <td class="paramname"><em>restrictionLevel</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the loosest restriction level allowed for strings. </p>
<p>The default if this is not called is <a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852af6dda9229dc422d3e8e41a23a1251060">USPOOF_HIGHLY_RESTRICTIVE</a>. Calling this method enables the <a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a1977848d7ccac6f3640fa684b452f69a">USPOOF_RESTRICTION_LEVEL</a> and <a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a0fbfe4596de0672faf4f0d4f01a823f6">USPOOF_MIXED_NUMBERS</a> checks, corresponding to Sections 5.1 and 5.2 of UTS 39. To customize which checks are to be performed by <a class="el" href="uspoof_8h.html#a21bb11dd91519e5033d43036a30e4d67">uspoof_check</a>, see <a class="el" href="uspoof_8h.html#a0d28ac52f3daa1317d3f3a6ee1324dab">uspoof_setChecks</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sc</td><td>The USpoofChecker </td></tr>
    <tr><td class="paramname">restrictionLevel</td><td>The loosest restriction level allowed. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="uspoof_8h.html#a566eea7ea15156355085eb7ff5013852" title="Constants from UAX #39 for use in uspoof_setRestrictionLevel, and for returned identifier restriction...">URestrictionLevel</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005560">Stable:</a></b></dt><dd>ICU 51 </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>