Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > 34ae14235711d1471f043ac894a061f9 > files > 400

libicu-doc-3.6-5.16.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>ICU 3.6: ucsdet.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    <li><a href="globals.html"><span>Globals</span></a></li>
  </ul></div>
<h1>ucsdet.h File Reference</h1>C API: Charset Detection API. <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="uenum_8h-source.html">unicode/uenum.h</a>&quot;</code><br>

<p>
<a href="ucsdet_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Structure representing a charset detector.  <a href="#f8708265ecf461d5014e8fc2376ceee1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="ucsdet_8h.html#229da006382e8a69262eb513a1cae88b">UCharsetMatch</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ucsdet_8h.html#229da006382e8a69262eb513a1cae88b">UCharsetMatch</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opaque structure representing a match that was identified from a charset detection operation.  <a href="#229da006382e8a69262eb513a1cae88b"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ucsdet_8h.html#59f0ebad887fcf9d9259e60a51e59087">ucsdet_open</a> (<a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Open a charset detector.  <a href="#59f0ebad887fcf9d9259e60a51e59087"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ucsdet_8h.html#adfae9b6ad0bf956209a3ba80222b71f">ucsdet_close</a> (<a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a> *ucsd)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Close a charset detector.  <a href="#adfae9b6ad0bf956209a3ba80222b71f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ucsdet_8h.html#87feb17c900d8c68d0bf7e04ca79f640">ucsdet_setText</a> (<a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a> *ucsd, const char *textIn, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> len, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the input byte data whose charset is to detected.  <a href="#87feb17c900d8c68d0bf7e04ca79f640"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ucsdet_8h.html#f8c976e3120ba501c74a12a7ba6c5fcb">ucsdet_setDeclaredEncoding</a> (<a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a> *ucsd, const char *encoding, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> <a class="el" href="ucnv_8h.html#885b7a4b123891f24dedd11fb6b2e641">length</a>, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the declared encoding for charset detection.  <a href="#f8c976e3120ba501c74a12a7ba6c5fcb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="ucsdet_8h.html#229da006382e8a69262eb513a1cae88b">UCharsetMatch</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ucsdet_8h.html#9f3eb31ff3d5194f9ac915214a8e94fd">ucsdet_detect</a> (<a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a> *ucsd, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the charset that best matches the supplied input data.  <a href="#9f3eb31ff3d5194f9ac915214a8e94fd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="ucsdet_8h.html#229da006382e8a69262eb513a1cae88b">UCharsetMatch</a> **&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ucsdet_8h.html#a44e027f88ec908eac008c68e2be97e4">ucsdet_detectAll</a> (<a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a> *ucsd, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *matchesFound, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find all charset matches that appear to be consistent with the input, returning an array of results.  <a href="#a44e027f88ec908eac008c68e2be97e4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ucsdet_8h.html#efcdb24ae3d5caec242d96d428b7156d">ucsdet_getName</a> (const <a class="el" href="ucsdet_8h.html#229da006382e8a69262eb513a1cae88b">UCharsetMatch</a> *ucsm, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the name of the charset represented by a UCharsetMatch.  <a href="#efcdb24ae3d5caec242d96d428b7156d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ucsdet_8h.html#b3c3caf71e3356d9d2a887828a305e4e">ucsdet_getConfidence</a> (const <a class="el" href="ucsdet_8h.html#229da006382e8a69262eb513a1cae88b">UCharsetMatch</a> *ucsm, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a confidence number for the quality of the match of the byte data with the charset.  <a href="#b3c3caf71e3356d9d2a887828a305e4e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ucsdet_8h.html#02459c6dd54c60e2e04908e44ef03472">ucsdet_getLanguage</a> (const <a class="el" href="ucsdet_8h.html#229da006382e8a69262eb513a1cae88b">UCharsetMatch</a> *ucsm, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the RFC 3066 code for the language of the input data.  <a href="#02459c6dd54c60e2e04908e44ef03472"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ucsdet_8h.html#26b1cbd917a169c0c59c3dfafbbd0676">ucsdet_getUChars</a> (const <a class="el" href="ucsdet_8h.html#229da006382e8a69262eb513a1cae88b">UCharsetMatch</a> *ucsm, UChar *buf, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> cap, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the entire input text as a UChar string, placing it into a caller-supplied buffer.  <a href="#26b1cbd917a169c0c59c3dfafbbd0676"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="uenum_8h.html#94e2cf04090303ede650080c6d091985">UEnumeration</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ucsdet_8h.html#bcdd772b8373906660bd04491159c4ab">ucsdet_getAllDetectableCharsets</a> (const <a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a> *ucsd, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get an iterator over the set of all detectable charsets - over the charsets that are known to the charset detection service.  <a href="#bcdd772b8373906660bd04491159c4ab"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ucsdet_8h.html#b13f154b45605497201475630f277e02">ucsdet_isInputFilterEnabled</a> (const <a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a> *ucsd)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Test whether input filtering is enabled for this charset detector.  <a href="#b13f154b45605497201475630f277e02"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ucsdet_8h.html#8b4e417cd84025aca5b02a9a9911c71a">ucsdet_enableInputFilter</a> (<a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a> *ucsd, <a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a> filter)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enable filtering of input text.  <a href="#8b4e417cd84025aca5b02a9a9911c71a"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
C API: Charset Detection API. 
<p>
This API provides a facility for detecting the charset or encoding of character data in an unknown text format. The input data can be from an array of bytes. <p>
Character set detection is at best an imprecise operation. The detection process will attempt to identify the charset that best matches the characteristics of the byte data, but the process is partly statistical in nature, and the results can not be guaranteed to always be correct. <p>
For best accuracy in charset detection, the input data should be primarily in a single language, and a minimum of a few hundred bytes worth of plain text in the language are needed. The detection process will attempt to ignore html or xml style markup that could otherwise obscure the content. 
<p>
Definition in file <a class="el" href="ucsdet_8h-source.html">ucsdet.h</a>.<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="f8708265ecf461d5014e8fc2376ceee1"></a><!-- doxytag: member="ucsdet.h::UCharsetDetector" ref="f8708265ecf461d5014e8fc2376ceee1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a> <a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Structure representing a charset detector. 
<p>
<dl compact><dt><b><a class="el" href="draft.html#_draft000194">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

<p>
Definition at line <a class="el" href="ucsdet_8h-source.html#l00052">52</a> of file <a class="el" href="ucsdet_8h-source.html">ucsdet.h</a>.
</div>
</div><p>
<a class="anchor" name="229da006382e8a69262eb513a1cae88b"></a><!-- doxytag: member="ucsdet.h::UCharsetMatch" ref="229da006382e8a69262eb513a1cae88b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="ucsdet_8h.html#229da006382e8a69262eb513a1cae88b">UCharsetMatch</a> <a class="el" href="ucsdet_8h.html#229da006382e8a69262eb513a1cae88b">UCharsetMatch</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Opaque structure representing a match that was identified from a charset detection operation. 
<p>
<dl compact><dt><b><a class="el" href="draft.html#_draft000195">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

<p>
Definition at line <a class="el" href="ucsdet_8h-source.html#l00060">60</a> of file <a class="el" href="ucsdet_8h-source.html">ucsdet.h</a>.
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="adfae9b6ad0bf956209a3ba80222b71f"></a><!-- doxytag: member="ucsdet.h::ucsdet_close" ref="adfae9b6ad0bf956209a3ba80222b71f" args="(UCharsetDetector *ucsd)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ucsdet_close           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a> *&nbsp;</td>
          <td class="paramname"> <em>ucsd</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Close a charset detector. 
<p>
All storage and any other resources owned by this charset detector will be released. Failure to close a charset detector when finished with it can result in memory leaks in the application.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ucsd</em>&nbsp;</td><td>The charset detector to be closed. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000197">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="9f3eb31ff3d5194f9ac915214a8e94fd"></a><!-- doxytag: member="ucsdet.h::ucsdet_detect" ref="9f3eb31ff3d5194f9ac915214a8e94fd" args="(UCharsetDetector *ucsd, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="ucsdet_8h.html#229da006382e8a69262eb513a1cae88b">UCharsetMatch</a>* ucsdet_detect           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a> *&nbsp;</td>
          <td class="paramname"> <em>ucsd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">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 width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the charset that best matches the supplied input data. 
<p>
Note though, that because the detection only looks at the start of the input data, there is a possibility that the returned charset will fail to handle the full set of input data. <p>
The returned UCharsetMatch object is owned by the UCharsetDetector. It will remain valid until the detector input is reset, or until the detector is closed. <p>
The function will fail if <ul>
<li>
no charset appears to match the data. </li>
<li>
no input text has been provided </li>
</ul>
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ucsd</em>&nbsp;</td><td>the charset detector to be used. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>any error conditions are reported back in this variable. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>a UCharsetMatch representing the best matching charset, or NULL if no charset matches the byte data.</dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000200">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="a44e027f88ec908eac008c68e2be97e4"></a><!-- doxytag: member="ucsdet.h::ucsdet_detectAll" ref="a44e027f88ec908eac008c68e2be97e4" args="(UCharsetDetector *ucsd, int32_t *matchesFound, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="ucsdet_8h.html#229da006382e8a69262eb513a1cae88b">UCharsetMatch</a>** ucsdet_detectAll           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a> *&nbsp;</td>
          <td class="paramname"> <em>ucsd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *&nbsp;</td>
          <td class="paramname"> <em>matchesFound</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">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 width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Find all charset matches that appear to be consistent with the input, returning an array of results. 
<p>
The results are ordered with the best quality match first.<p>
Because the detection only looks at a limited amount of the input byte data, some of the returned charsets may fail to handle the all of input data. <p>
The returned UCharsetMatch objects are owned by the UCharsetDetector. They will remain valid until the detector is closed or modified<p>
Return an error if <ul>
<li>
no charsets appear to match the input data. </li>
<li>
no input text has been provided </li>
</ul>
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ucsd</em>&nbsp;</td><td>the charset detector to be used. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>matchesFound</em>&nbsp;</td><td>pointer to a variable that will be set to the number of charsets identified that are consistent with the input data. Output only. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>any error conditions are reported back in this variable. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>A pointer to an array of pointers to UCharSetMatch objects. This array, and the UCharSetMatch instances to which it refers, are owned by the UCharsetDetector, and will remain valid until the detector is closed or modified. </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000201">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="8b4e417cd84025aca5b02a9a9911c71a"></a><!-- doxytag: member="ucsdet.h::ucsdet_enableInputFilter" ref="8b4e417cd84025aca5b02a9a9911c71a" args="(UCharsetDetector *ucsd, UBool filter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a> ucsdet_enableInputFilter           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a> *&nbsp;</td>
          <td class="paramname"> <em>ucsd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a>&nbsp;</td>
          <td class="paramname"> <em>filter</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Enable filtering of input text. 
<p>
If filtering is enabled, text within angle brackets ("&lt;" and "&gt;") will be removed before detection, which will remove most HTML or xml markup.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ucsd</em>&nbsp;</td><td>the charset detector to be modified. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>filter</em>&nbsp;</td><td><code>true</code> to enable input text filtering. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The previous setting.</dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000208">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="bcdd772b8373906660bd04491159c4ab"></a><!-- doxytag: member="ucsdet.h::ucsdet_getAllDetectableCharsets" ref="bcdd772b8373906660bd04491159c4ab" args="(const UCharsetDetector *ucsd, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="uenum_8h.html#94e2cf04090303ede650080c6d091985">UEnumeration</a>* ucsdet_getAllDetectableCharsets           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a> *&nbsp;</td>
          <td class="paramname"> <em>ucsd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">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 width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get an iterator over the set of all detectable charsets - over the charsets that are known to the charset detection service. 
<p>
The returned UEnumeration provides access to the names of the charsets.<p>
The state of the Charset detector that is passed in does not affect the result of this function, but requiring a valid, open charset detector as a parameter insures that the charset detection service has been safely initialized and that the required detection data is available.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ucsd</em>&nbsp;</td><td>a Charset detector. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Any error conditions are reported back in this variable. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>an iterator providing access to the detectable charset names. </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000206">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="b3c3caf71e3356d9d2a887828a305e4e"></a><!-- doxytag: member="ucsdet.h::ucsdet_getConfidence" ref="b3c3caf71e3356d9d2a887828a305e4e" args="(const UCharsetMatch *ucsm, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> ucsdet_getConfidence           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ucsdet_8h.html#229da006382e8a69262eb513a1cae88b">UCharsetMatch</a> *&nbsp;</td>
          <td class="paramname"> <em>ucsm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">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 width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get a confidence number for the quality of the match of the byte data with the charset. 
<p>
Confidence numbers range from zero to 100, with 100 representing complete confidence and zero representing no confidence.<p>
The confidence values are somewhat arbitrary. They define an an ordering within the results for any single detection operation but are not generally comparable between the results for different input.<p>
A confidence value of ten does have a general meaning - it is used for charsets that can represent the input data, but for which there is no other indication that suggests that the charset is the correct one. Pure 7 bit ASCII data, for example, is compatible with a great many charsets, most of which will appear as possible matches with a confidence of 10.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ucsm</em>&nbsp;</td><td>The charset match object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Any error conditions are reported back in this variable. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>A confidence number for the charset match.</dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000203">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="02459c6dd54c60e2e04908e44ef03472"></a><!-- doxytag: member="ucsdet.h::ucsdet_getLanguage" ref="02459c6dd54c60e2e04908e44ef03472" args="(const UCharsetMatch *ucsm, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* ucsdet_getLanguage           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ucsdet_8h.html#229da006382e8a69262eb513a1cae88b">UCharsetMatch</a> *&nbsp;</td>
          <td class="paramname"> <em>ucsm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">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 width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the RFC 3066 code for the language of the input data. 
<p>
The Charset Detection service is intended primarily for detecting charsets, not language. For some, but not all, charsets, a language is identified as a byproduct of the detection process, and that is what is returned by this function.<p>
CAUTION: 1. Language information is not available for input data encoded in all charsets. In particular, no language is identified for UTF-8 input data.<p>
2. Closely related languages may sometimes be confused.<p>
If more accurate language detection is required, a linguistic analysis package should be used.<p>
The storage for the returned name string is owned by the UCharsetMatch, and will remain valid while the UCharsetMatch is valid.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ucsm</em>&nbsp;</td><td>The charset match object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Any error conditions are reported back in this variable. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The RFC 3066 code for the language of the input data, or an empty string if the language could not be determined.</dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000204">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="efcdb24ae3d5caec242d96d428b7156d"></a><!-- doxytag: member="ucsdet.h::ucsdet_getName" ref="efcdb24ae3d5caec242d96d428b7156d" args="(const UCharsetMatch *ucsm, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* ucsdet_getName           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ucsdet_8h.html#229da006382e8a69262eb513a1cae88b">UCharsetMatch</a> *&nbsp;</td>
          <td class="paramname"> <em>ucsm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">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 width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the name of the charset represented by a UCharsetMatch. 
<p>
The storage for the returned name string is owned by the UCharsetMatch, and will remain valid while the UCharsetMatch is valid.<p>
The name returned is suitable for use with the ICU conversion APIs.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ucsm</em>&nbsp;</td><td>The charset match object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Any error conditions are reported back in this variable. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The name of the matching charset.</dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000202">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="26b1cbd917a169c0c59c3dfafbbd0676"></a><!-- doxytag: member="ucsdet.h::ucsdet_getUChars" ref="26b1cbd917a169c0c59c3dfafbbd0676" args="(const UCharsetMatch *ucsm, UChar *buf, int32_t cap, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> ucsdet_getUChars           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ucsdet_8h.html#229da006382e8a69262eb513a1cae88b">UCharsetMatch</a> *&nbsp;</td>
          <td class="paramname"> <em>ucsm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">UChar *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>cap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">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 width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the entire input text as a UChar string, placing it into a caller-supplied buffer. 
<p>
A terminating NUL character will be appended to the buffer if space is available.<p>
The number of UChars in the output string, not including the terminating NUL, is returned.<p>
If the supplied buffer is smaller than required to hold the output, the contents of the buffer are undefined. The full output string length (in UChars) is returned as always, and can be used to allocate a buffer of the correct size.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ucsm</em>&nbsp;</td><td>The charset match object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>A UChar buffer to be filled with the converted text data. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cap</em>&nbsp;</td><td>The capacity of the buffer in UChars. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Any error conditions are reported back in this variable. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The number of UChars in the output string.</dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000205">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="b13f154b45605497201475630f277e02"></a><!-- doxytag: member="ucsdet.h::ucsdet_isInputFilterEnabled" ref="b13f154b45605497201475630f277e02" args="(const UCharsetDetector *ucsd)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a> ucsdet_isInputFilterEnabled           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a> *&nbsp;</td>
          <td class="paramname"> <em>ucsd</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Test whether input filtering is enabled for this charset detector. 
<p>
Input filtering removes text that appears to be HTML or xml markup from the input before applying the code page detection heuristics.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ucsd</em>&nbsp;</td><td>The charset detector to check. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>TRUE if filtering is enabled. </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000207">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="59f0ebad887fcf9d9259e60a51e59087"></a><!-- doxytag: member="ucsdet.h::ucsdet_open" ref="59f0ebad887fcf9d9259e60a51e59087" args="(UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a>* ucsdet_open           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Open a charset detector. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Any error conditions occurring during the open operation are reported back in this variable. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the newly opened charset detector. </dd></dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000196">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="f8c976e3120ba501c74a12a7ba6c5fcb"></a><!-- doxytag: member="ucsdet.h::ucsdet_setDeclaredEncoding" ref="f8c976e3120ba501c74a12a7ba6c5fcb" args="(UCharsetDetector *ucsd, const char *encoding, int32_t length, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ucsdet_setDeclaredEncoding           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a> *&nbsp;</td>
          <td class="paramname"> <em>ucsd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>encoding</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">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 width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the declared encoding for charset detection. 
<p>
The declared encoding of an input text is an encoding obtained by the user from an http header or xml declaration or similar source that can be provided as an additional hint to the charset detector.<p>
How and whether the declared encoding will be used during the detection process is TBD.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ucsd</em>&nbsp;</td><td>the charset detector to be used. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>encoding</em>&nbsp;</td><td>an encoding for the current data obtained from a header or declaration or other source outside of the byte data itself. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>the length of the encoding name, or -1 if the name string is NUL terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>any error conditions are reported back in this variable.</td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000199">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="87feb17c900d8c68d0bf7e04ca79f640"></a><!-- doxytag: member="ucsdet.h::ucsdet_setText" ref="87feb17c900d8c68d0bf7e04ca79f640" args="(UCharsetDetector *ucsd, const char *textIn, int32_t len, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ucsdet_setText           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ucsdet_8h.html#f8708265ecf461d5014e8fc2376ceee1">UCharsetDetector</a> *&nbsp;</td>
          <td class="paramname"> <em>ucsd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>textIn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">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 width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the input byte data whose charset is to detected. 
<p>
Ownership of the input text byte array remains with the caller. The input string must not be altered or deleted until the charset detector is either closed or reset to refer to different input text.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ucsd</em>&nbsp;</td><td>the charset detector to be used. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>textIn</em>&nbsp;</td><td>the input text of unknown encoding. . </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>the length of the input text, or -1 if the text is NUL terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>any error conditions are reported back in this variable.</td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="draft.html#_draft000198">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 3.6 </dd></dl>

</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Tue Dec 13 17:29:52 2011 for ICU 3.6 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>