Sophie

Sophie

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

icu-doc-4.4-2.1mdv2010.2.i586.rpm

<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ICU 4.4: uspoof.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>uspoof.h File Reference</h1>
<p>C API: Unicode Spoof Detection.  
<a href="#_details">More...</a></p>
<code>#include &quot;<a class="el" href="utypes_8h_source.html">unicode/utypes.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="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/>

<p><a href="uspoof_8h_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad5e4927218c9e62595a67378cf6e371f"></a><!-- doxytag: member="uspoof.h::USpoofChecker" ref="ad5e4927218c9e62595a67378cf6e371f" args="" -->
typedef struct <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">typedef for C of USpoofChecker <br/></td></tr>
<tr><td colspan="2"><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155">USpoofChecks</a> { <br/>
&nbsp;&nbsp;<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#a0dbd60e53a571689baf65c63f4de8155ae65a72b384e76f7ac1cc4df1decd8057">USPOOF_ANY_CASE</a> =  8, 
<br/>
&nbsp;&nbsp;<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a68b7d294c1566c1f4a74e2b3a952a138">USPOOF_SINGLE_SCRIPT</a> =  16, 
<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a7324a51073ca18279da8706d8c21ee0c">USPOOF_INVISIBLE</a> =  32, 
<a class="el" href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155a3f3e13d5b54cc156864a2aca221b3888">USPOOF_CHAR_LIMIT</a> =  64, 
<b>USPOOF_ALL_CHECKS</b> =  0x7f
<br/>
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Enum for the kinds of checks that USpoofChecker can perform. </p>
 <a href="uspoof_8h.html#a0dbd60e53a571689baf65c63f4de8155">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&nbsp;</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><td class="mdescLeft">&nbsp;</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"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">U_CAPI <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#abf24810ddfa72bb63a2780f157bb7916">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><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Open a Spoof checker from its serialized from, stored in 32-bit-aligned memory.  <a href="#abf24810ddfa72bb63a2780f157bb7916"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">U_CAPI <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#af8bbe0cb32bb948e3ac349844b9990a1">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><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Open a Spoof Checker from the source form of the spoof data.  <a href="#af8bbe0cb32bb948e3ac349844b9990a1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</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><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Close a Spoof Checker, freeing any memory that was being held by its implementation.  <a href="#ab63b4f7780b1d6c57a31624ad5c3db41"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&nbsp;</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><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clone a Spoof Checker.  <a href="#a5a6a3fff21c2aa515d3e16da47609a48"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a1600b90af8fde36cf87d6c6be8df5af0">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><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specify the set of checks that will be performed by the check functions of this Spoof Checker.  <a href="#a1600b90af8fde36cf87d6c6be8df5af0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a11c9d7b315c2f4b1011619bd4df91cf8">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><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the set of checks that this Spoof Checker has been configured to perform.  <a href="#a11c9d7b315c2f4b1011619bd4df91cf8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#aca1b0d0630a88af80c56e8205761f6a1">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><td class="mdescLeft">&nbsp;</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="#aca1b0d0630a88af80c56e8205761f6a1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#ae9105b5d6d3dd326dcfd60fe3730f5d0">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><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a list of locales for the scripts that are acceptable in strings to be checked.  <a href="#ae9105b5d6d3dd326dcfd60fe3730f5d0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#abe089c3471eb52dbbd7268c3eb9db695">uspoof_setAllowedChars</a> (<a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, const <a class="el" href="uset_8h.html#adce3fef7c15d7c78196bf977ac96ec9c">USet</a> *chars, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Limit the acceptable characters to those specified by a Unicode Set.  <a href="#abe089c3471eb52dbbd7268c3eb9db695"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="uset_8h.html#adce3fef7c15d7c78196bf977ac96ec9c">USet</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#ab15e60d2aaaa9ea5d49eb4524c41fa9e">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><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a USet for the characters permitted in an identifier.  <a href="#ab15e60d2aaaa9ea5d49eb4524c41fa9e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a6ea81c89a7dd8d21afba293c8ad3e5e5">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> *text, int32_t length, int32_t *position, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check the specified string for possible security issues.  <a href="#a6ea81c89a7dd8d21afba293c8ad3e5e5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a1185af276dd26760d4f35eb690d52250">uspoof_checkUTF8</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, const char *text, int32_t length, int32_t *position, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check the specified string for possible security issues.  <a href="#a1185af276dd26760d4f35eb690d52250"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a30478be8a197dd7c3ac19a2a94ad8c6d">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> *s1, int32_t length1, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *s2, int32_t length2, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check the whether two specified strings are visually confusable.  <a href="#a30478be8a197dd7c3ac19a2a94ad8c6d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#ab4c036b175cfeabf5a2b0c18f2eaac00">uspoof_areConfusableUTF8</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, const char *s1, int32_t length1, const char *s2, int32_t length2, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check the whether two specified strings are visually confusable.  <a href="#ab4c036b175cfeabf5a2b0c18f2eaac00"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a848c780fd8a59f18e1835608e6fe6b76">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> *s, 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><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the "skeleton" for an identifier string.  <a href="#a848c780fd8a59f18e1835608e6fe6b76"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#ac28b7bee6ac0f6b64e1ae844fcca4240">uspoof_getSkeletonUTF8</a> (const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *sc, uint32_t type, const char *s, int32_t length, char *dest, int32_t destCapacity, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the "skeleton" for an identifier string.  <a href="#ac28b7bee6ac0f6b64e1ae844fcca4240"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">U_CAPI int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uspoof_8h.html#a0fc8fb61fee3c75c6db54770abeb240d">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><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Serialize the data for a spoof detector into a chunk of memory.  <a href="#a0fc8fb61fee3c75c6db54770abeb240d"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>C API: Unicode Spoof Detection. </p>

<p>Definition in file <a class="el" href="uspoof_8h_source.html">uspoof.h</a>.</p>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155"></a><!-- doxytag: member="uspoof.h::USpoofChecks" ref="a0dbd60e53a571689baf65c63f4de8155" args="" -->
<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#_stable003873">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155adc4588fd7ff74c3a6e5cc91d3a6f5d60"></a><!-- doxytag: member="USPOOF_SINGLE_SCRIPT_CONFUSABLE" ref="a0dbd60e53a571689baf65c63f4de8155adc4588fd7ff74c3a6e5cc91d3a6f5d60" args="" -->USPOOF_SINGLE_SCRIPT_CONFUSABLE</em>&nbsp;</td><td>
<p>Single script confusable test. </p>
<p>When testing whether two identifiers are confusable, report that they are if both are from the same script and they are visually confusable. Note: this test is not applicable to a check of a single identifier. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155a76a60327ab14a68342242aae60340106"></a><!-- doxytag: member="USPOOF_MIXED_SCRIPT_CONFUSABLE" ref="a0dbd60e53a571689baf65c63f4de8155a76a60327ab14a68342242aae60340106" args="" -->USPOOF_MIXED_SCRIPT_CONFUSABLE</em>&nbsp;</td><td>
<p>Mixed script confusable test. </p>
<p>When checking a single identifier, report a problem if the identifier contains multiple scripts, and is confusable with some other identifier in a single script When testing whether two identifiers are confusable, report that they are if the two IDs are visually confusable, and at least one contains characters from more than one script. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155abfc834ae8c881e54a7922648d5fecead"></a><!-- doxytag: member="USPOOF_WHOLE_SCRIPT_CONFUSABLE" ref="a0dbd60e53a571689baf65c63f4de8155abfc834ae8c881e54a7922648d5fecead" args="" -->USPOOF_WHOLE_SCRIPT_CONFUSABLE</em>&nbsp;</td><td>
<p>Whole script confusable test. </p>
<p>When checking a single identifier, report a problem if The identifier is of a single script, and there exists a confusable identifier in another script. When testing whether two identifiers are confusable, report that they are if each is of a single script, the scripts of the two identifiers are different, and the identifiers are visually confusable. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155ae65a72b384e76f7ac1cc4df1decd8057"></a><!-- doxytag: member="USPOOF_ANY_CASE" ref="a0dbd60e53a571689baf65c63f4de8155ae65a72b384e76f7ac1cc4df1decd8057" args="" -->USPOOF_ANY_CASE</em>&nbsp;</td><td>
<p>Any Case Modifier for confusable identifier tests. </p>
<p>If specified, consider all characters, of any case, when looking for confusables. If USPOOF_ANY_CASE is not specified, identifiers being checked are assumed to have been case folded. Upper case confusable characters will not be checked. Selects between Lower Case Confusable and Any Case Confusable. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155a68b7d294c1566c1f4a74e2b3a952a138"></a><!-- doxytag: member="USPOOF_SINGLE_SCRIPT" ref="a0dbd60e53a571689baf65c63f4de8155a68b7d294c1566c1f4a74e2b3a952a138" args="" -->USPOOF_SINGLE_SCRIPT</em>&nbsp;</td><td>
<p>Check that an identifier contains only characters from a single script (plus chars from the common and inherited scripts. </p>
<p>) Applies to checks of a single identifier check only. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155a7324a51073ca18279da8706d8c21ee0c"></a><!-- doxytag: member="USPOOF_INVISIBLE" ref="a0dbd60e53a571689baf65c63f4de8155a7324a51073ca18279da8706d8c21ee0c" args="" -->USPOOF_INVISIBLE</em>&nbsp;</td><td>
<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 valign="top"><em><a class="anchor" id="a0dbd60e53a571689baf65c63f4de8155a3f3e13d5b54cc156864a2aca221b3888"></a><!-- doxytag: member="USPOOF_CHAR_LIMIT" ref="a0dbd60e53a571689baf65c63f4de8155a3f3e13d5b54cc156864a2aca221b3888" args="" -->USPOOF_CHAR_LIMIT</em>&nbsp;</td><td>
<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#abe089c3471eb52dbbd7268c3eb9db695" title="Limit the acceptable characters to those specified by a Unicode Set.">uspoof_setAllowedChars()</a> and <a class="el" href="uspoof_8h.html#aca1b0d0630a88af80c56e8205761f6a1" title="Limit characters that are acceptable in identifiers being checked to those normally...">uspoof_setAllowedLocales()</a>. </p>
</td></tr>
</table>
</dd>
</dl>

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

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a30478be8a197dd7c3ac19a2a94ad8c6d"></a><!-- doxytag: member="uspoof.h::uspoof_areConfusable" ref="a30478be8a197dd7c3ac19a2a94ad8c6d" args="(const USpoofChecker *sc, const UChar *s1, int32_t length1, const UChar *s2, int32_t length2, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t uspoof_areConfusable </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>s1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>s2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <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>The types of confusability to be tested - single script, mixed script, or whole script - are determined by the check options set for the USpoofChecker.</p>
<p>The tests to be performed are controlled by the flags USPOOF_SINGLE_SCRIPT_CONFUSABLE USPOOF_MIXED_SCRIPT_CONFUSABLE USPOOF_WHOLE_SCRIPT_CONFUSABLE At least one of these tests must be selected.</p>
<p>USPOOF_ANY_CASE is a modifier for the tests. Select it if the identifiers may be of mixed case. If identifiers are case folded for comparison and display to the user, do not select the USPOOF_ANY_CASE option.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sc</em>&nbsp;</td><td>The USpoofChecker </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>s1</em>&nbsp;</td><td>The first of the two strings to be compared for confusability. The strings are in UTF-16 format. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length1</em>&nbsp;</td><td>the length of the first string, expressed in 16 bit UTF-16 code units, or -1 if the string is zero terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>s2</em>&nbsp;</td><td>The second of the two strings to be compared for confusability. The strings are in UTF-16 format. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length2</em>&nbsp;</td><td>The length of the second string, expressed in 16 bit UTF-16 code units, or -1 if the string is zero terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</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="return"><dt><b>Returns:</b></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#_stable003887">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="ab4c036b175cfeabf5a2b0c18f2eaac00"></a><!-- doxytag: member="uspoof.h::uspoof_areConfusableUTF8" ref="ab4c036b175cfeabf5a2b0c18f2eaac00" args="(const USpoofChecker *sc, const char *s1, int32_t length1, const char *s2, int32_t length2, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t uspoof_areConfusableUTF8 </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&nbsp;</td>
          <td class="paramname"> <em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>s1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>length1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>s2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <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>The types of confusability to be tested - single script, mixed script, or whole script - are determined by the check options set for the USpoofChecker.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sc</em>&nbsp;</td><td>The USpoofChecker </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>s1</em>&nbsp;</td><td>The first of the two strings to be compared for confusability. The strings are in UTF-8 format. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length1</em>&nbsp;</td><td>the length of the first string, in bytes, or -1 if the string is zero terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>s2</em>&nbsp;</td><td>The second of the two strings to be compared for confusability. The strings are in UTF-18 format. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length2</em>&nbsp;</td><td>The length of the second string in bytes, or -1 if the string is zero terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</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="return"><dt><b>Returns:</b></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#_stable003888">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a6ea81c89a7dd8d21afba293c8ad3e5e5"></a><!-- doxytag: member="uspoof.h::uspoof_check" ref="a6ea81c89a7dd8d21afba293c8ad3e5e5" args="(const USpoofChecker *sc, const UChar *text, int32_t length, int32_t *position, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t uspoof_check </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <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#a1600b90af8fde36cf87d6c6be8df5af0" title="Specify the set of checks that will be performed by the check functions of this Spoof...">uspoof_setChecks()</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sc</em>&nbsp;</td><td>The USpoofChecker </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>The string to be checked for possible security issues, in UTF-16 format. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</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 valign="top"></td><td valign="top"><em>position</em>&nbsp;</td><td>An out parameter that receives the index of the first string position that fails the allowed character limitation checks. This parameter may be null if the position information is not needed. If the string passes the requested checks the parameter value will not be set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</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="return"><dt><b>Returns:</b></dt><dd>An integer value with bits set for any potential security or spoofing issues detected. The bits are defined by enum USpoofChecks. Zero is returned if no issues are found with the input string. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003885">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a1185af276dd26760d4f35eb690d52250"></a><!-- doxytag: member="uspoof.h::uspoof_checkUTF8" ref="a1185af276dd26760d4f35eb690d52250" args="(const USpoofChecker *sc, const char *text, int32_t length, int32_t *position, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t uspoof_checkUTF8 </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&nbsp;</td>
          <td class="paramname"> <em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <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#a1600b90af8fde36cf87d6c6be8df5af0" title="Specify the set of checks that will be performed by the check functions of this Spoof...">uspoof_setChecks()</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sc</em>&nbsp;</td><td>The USpoofChecker </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>A UTF-8 string to be checked for possible security issues. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>the length of the string to be checked, or -1 if the string is zero terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>position</em>&nbsp;</td><td>An out parameter that receives the index of the first string position that fails the allowed character limitation checks. This parameter may be null if the position information is not needed. If the string passes the requested checks the parameter value will not be set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</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="return"><dt><b>Returns:</b></dt><dd>An integer value with bits set for any potential security or spoofing issues detected. The bits are defined by enum USpoofChecks. Zero is returned if no issues are found with the input string. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003886">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a5a6a3fff21c2aa515d3e16da47609a48"></a><!-- doxytag: member="uspoof.h::uspoof_clone" ref="a5a6a3fff21c2aa515d3e16da47609a48" args="(const USpoofChecker *sc, UErrorCode *status)" -->
<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> *&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <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><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sc</em>&nbsp;</td><td>The source USpoofChecker </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>The error code, set if this function encounters a problem. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd></dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003878">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="ab63b4f7780b1d6c57a31624ad5c3db41"></a><!-- doxytag: member="uspoof.h::uspoof_close" ref="ab63b4f7780b1d6c57a31624ad5c3db41" args="(USpoofChecker *sc)" -->
<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> *&nbsp;</td>
          <td class="paramname"> <em>sc</em></td>
          <td>&nbsp;)&nbsp;</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#_stable003877">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="ab15e60d2aaaa9ea5d49eb4524c41fa9e"></a><!-- doxytag: member="uspoof.h::uspoof_getAllowedChars" ref="ab15e60d2aaaa9ea5d49eb4524c41fa9e" args="(const USpoofChecker *sc, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="uset_8h.html#adce3fef7c15d7c78196bf977ac96ec9c">USet</a>* uspoof_getAllowedChars </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <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><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sc</em>&nbsp;</td><td>The USpoofChecker </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>The error code, set if this function encounters a problem. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></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#_stable003884">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="ae9105b5d6d3dd326dcfd60fe3730f5d0"></a><!-- doxytag: member="uspoof.h::uspoof_getAllowedLocales" ref="ae9105b5d6d3dd326dcfd60fe3730f5d0" args="(USpoofChecker *sc, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* uspoof_getAllowedLocales </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <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#abe089c3471eb52dbbd7268c3eb9db695" 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#aca1b0d0630a88af80c56e8205761f6a1" title="Limit characters that are acceptable in identifiers being checked to those normally...">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><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sc</em>&nbsp;</td><td>The USpoofChecker </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>The error code, set if this function encounters a problem. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></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#_stable003882">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a11c9d7b315c2f4b1011619bd4df91cf8"></a><!-- doxytag: member="uspoof.h::uspoof_getChecks" ref="a11c9d7b315c2f4b1011619bd4df91cf8" args="(const USpoofChecker *sc, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t uspoof_getChecks </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <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><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sc</em>&nbsp;</td><td>The USpoofChecker </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>The error code, set if this function encounters a problem. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></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#_stable003880">Stable:</a></b></dt><dd>ICU 4.2</dd></dl>

</div>
</div>
<a class="anchor" id="a848c780fd8a59f18e1835608e6fe6b76"></a><!-- doxytag: member="uspoof.h::uspoof_getSkeleton" ref="a848c780fd8a59f18e1835608e6fe6b76" args="(const USpoofChecker *sc, uint32_t type, const UChar *s, int32_t length, UChar *dest, int32_t destCapacity, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t uspoof_getSkeleton </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&nbsp;</td>
          <td class="paramname"> <em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the "skeleton" for an identifier string. </p>
<p>Skeletons are a transformation of the input string; Two strings 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><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sc</em>&nbsp;</td><td>The USpoofChecker </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>The type of skeleton, corresponding to which of the Unicode confusable data tables to use. The default is Mixed-Script, Lowercase. Allowed options are USPOOF_SINGLE_SCRIPT_CONFUSABLE and USPOOF_ANY_CASE_CONFUSABLE. The two flags may be ORed. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>The input string whose skeleton will be computed. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>The length of the input string, expressed in 16 bit UTF-16 code units, or -1 if the string is zero terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>The output buffer, to receive the skeleton string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>destCapacity</em>&nbsp;</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 valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>The error code, set if an error occurred while attempting to perform the check. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></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#_stable003889">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="ac28b7bee6ac0f6b64e1ae844fcca4240"></a><!-- doxytag: member="uspoof.h::uspoof_getSkeletonUTF8" ref="ac28b7bee6ac0f6b64e1ae844fcca4240" args="(const USpoofChecker *sc, uint32_t type, const char *s, int32_t length, char *dest, int32_t destCapacity, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t uspoof_getSkeletonUTF8 </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&nbsp;</td>
          <td class="paramname"> <em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the "skeleton" for an identifier string. </p>
<p>Skeletons are a transformation of the input string; Two strings 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><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sc</em>&nbsp;</td><td>The USpoofChecker </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>The type of skeleton, corresponding to which of the Unicode confusable data tables to use. The default is Mixed-Script, Lowercase. Allowed options are USPOOF_SINGLE_SCRIPT_CONFUSABLE and USPOOF_ANY_CASE. The two flags may be ORed. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>The UTF-8 format input string whose skeleton will be computed. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>The length of the input string, in bytes, or -1 if the string is zero terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>The output buffer, to receive the skeleton string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>destCapacity</em>&nbsp;</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 valign="top"></td><td valign="top"><em>status</em>&nbsp;</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="return"><dt><b>Returns:</b></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#_stable003890">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="afeff54ce632c1357e914334009becb62"></a><!-- doxytag: member="uspoof.h::uspoof_open" ref="afeff54ce632c1357e914334009becb62" args="(UErrorCode *status)" -->
<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> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td>
          <td>&nbsp;)&nbsp;</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><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>The error code, set if this function encounters a problem. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the newly created Spoof Checker </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003874">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="abf24810ddfa72bb63a2780f157bb7916"></a><!-- doxytag: member="uspoof.h::uspoof_openFromSerialized" ref="abf24810ddfa72bb63a2780f157bb7916" args="(const void *data, int32_t length, int32_t *pActualLength, UErrorCode *pErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">U_CAPI <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a>* uspoof_openFromSerialized </td>
          <td>(</td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>pErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Open a Spoof checker from its serialized from, stored in 32-bit-aligned memory. </p>
<p>Inverse of <a class="el" href="uspoof_8h.html#a0fc8fb61fee3c75c6db54770abeb240d" 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><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>a pointer to 32-bit-aligned memory containing the serialized form of spoof data </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>the number of bytes available at data; can be more than necessary </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pActualLength</em>&nbsp;</td><td>receives the actual number of bytes at data taken up by the data; can be NULL </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pErrorCode</em>&nbsp;</td><td>ICU error code </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the spoof checker.</dd></dl>
<dl class="see"><dt><b>See also:</b></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...">uspoof_open</a> </dd>
<dd>
<a class="el" href="uspoof_8h.html#a0fc8fb61fee3c75c6db54770abeb240d" 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#_stable003875">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="af8bbe0cb32bb948e3ac349844b9990a1"></a><!-- doxytag: member="uspoof.h::uspoof_openFromSource" ref="af8bbe0cb32bb948e3ac349844b9990a1" args="(const char *confusables, int32_t confusablesLen, const char *confusablesWholeScript, int32_t confusablesWholeScriptLen, int32_t *errType, UParseError *pe, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">U_CAPI <a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a>* uspoof_openFromSource </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>confusables</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>confusablesLen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>confusablesWholeScript</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>confusablesWholeScriptLen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&nbsp;</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> *&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <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 Three inputs correspond to the Unicode data files confusables.txt confusablesWholeScript.txt and xidmdifications.txt as described in Unicode UAX 39. The syntax of the source data is as described in UAX 39 for these files, and the content of these files is acceptable input.</p>
<p>The character encoding of the (char *) input text is UTF-8.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>confusables</em>&nbsp;</td><td>a pointer to the confusable characters definitions, as found in file confusables.txt from unicode.org. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>confusablesLen</em>&nbsp;</td><td>The length of the confusables text, or -1 if the input string is zero terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>confusablesWholeScript</em>&nbsp;</td><td>a pointer to the whole script confusables definitions, as found in the file confusablesWholeScript.txt from unicode.org. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>confusablesWholeScriptLen</em>&nbsp;</td><td>The length of the whole script confusables text, or -1 if the input string is zero terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>errType</em>&nbsp;</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 valign="top"></td><td valign="top"><em>pe</em>&nbsp;</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 valign="top"></td><td valign="top"><em>status</em>&nbsp;</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="return"><dt><b>Returns:</b></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#_stable003876">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a0fc8fb61fee3c75c6db54770abeb240d"></a><!-- doxytag: member="uspoof.h::uspoof_serialize" ref="a0fc8fb61fee3c75c6db54770abeb240d" args="(USpoofChecker *sc, void *data, int32_t capacity, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">U_CAPI int32_t uspoof_serialize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&nbsp;</td>
          <td class="paramname"> <em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <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>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sc</em>&nbsp;</td><td>the Spoof Detector whose data is to be serialized. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</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 valign="top"></td><td valign="top"><em>capacity</em>&nbsp;</td><td>the number of bytes available at data, or 0 for preflighting </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>an in/out ICU UErrorCode; possible errors include:</p>
<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="return"><dt><b>Returns:</b></dt><dd>the number of bytes written or needed for the spoof data</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>utrie2_openFromSerialized() </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003891">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="abe089c3471eb52dbbd7268c3eb9db695"></a><!-- doxytag: member="uspoof.h::uspoof_setAllowedChars" ref="abe089c3471eb52dbbd7268c3eb9db695" args="(USpoofChecker *sc, const USet *chars, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void uspoof_setAllowedChars </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&nbsp;</td>
          <td class="paramname"> <em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="uset_8h.html#adce3fef7c15d7c78196bf977ac96ec9c">USet</a> *&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <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#aca1b0d0630a88af80c56e8205761f6a1" title="Limit characters that are acceptable in identifiers being checked to those normally...">uspoof_setAllowedLocales()</a> function.</p>
<p>The USPOOF_CHAR_LIMIT test is automatically enabled for this USpoofChecker by this function.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sc</em>&nbsp;</td><td>The USpoofChecker </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>chars</em>&nbsp;</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 valign="top"></td><td valign="top"><em>status</em>&nbsp;</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#_stable003883">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="aca1b0d0630a88af80c56e8205761f6a1"></a><!-- doxytag: member="uspoof.h::uspoof_setAllowedLocales" ref="aca1b0d0630a88af80c56e8205761f6a1" args="(USpoofChecker *sc, const char *localesList, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void uspoof_setAllowedLocales </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&nbsp;</td>
          <td class="paramname"> <em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <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 USPOOF_CHAR_LIMIT 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#ab15e60d2aaaa9ea5d49eb4524c41fa9e" title="Get a USet for the characters permitted in an identifier.">uspoof_getAllowedChars()</a> function. <a class="el" href="uspoof_8h.html#aca1b0d0630a88af80c56e8205761f6a1" title="Limit characters that are acceptable in identifiers being checked to those normally...">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#aca1b0d0630a88af80c56e8205761f6a1" title="Limit characters that are acceptable in identifiers being checked to those normally...">uspoof_setAllowedLocales()</a> by fetching the resulting set with <a class="el" href="uspoof_8h.html#ab15e60d2aaaa9ea5d49eb4524c41fa9e" 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#abe089c3471eb52dbbd7268c3eb9db695" title="Limit the acceptable characters to those specified by a Unicode Set.">uspoof_setAllowedChars()</a></p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sc</em>&nbsp;</td><td>The USpoofChecker </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>localesList</em>&nbsp;</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 valign="top"></td><td valign="top"><em>status</em>&nbsp;</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#_stable003881">Stable:</a></b></dt><dd>ICU 4.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a1600b90af8fde36cf87d6c6be8df5af0"></a><!-- doxytag: member="uspoof.h::uspoof_setChecks" ref="a1600b90af8fde36cf87d6c6be8df5af0" args="(USpoofChecker *sc, int32_t checks, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void uspoof_setChecks </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uspoof_8h.html#ad5e4927218c9e62595a67378cf6e371f">USpoofChecker</a> *&nbsp;</td>
          <td class="paramname"> <em>sc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Specify the set of checks that will be performed by the check functions of this Spoof Checker. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sc</em>&nbsp;</td><td>The USpoofChecker </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>checks</em>&nbsp;</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 valign="top"></td><td valign="top"><em>status</em>&nbsp;</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#_stable003879">Stable:</a></b></dt><dd>ICU 4.2</dd></dl>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

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

<hr size="1"/><address style="text-align: right;"><small>Generated on 16 Mar 2010 for ICU 4.4 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>