Sophie

Sophie

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

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: putil.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>putil.h File Reference</h1>C API: Platform Utilities. <a href="#_details">More...</a>
<p>
<code>#include &quot;<a class="el" href="utypes_8h-source.html">unicode/utypes.h</a>&quot;</code><br>

<p>
<a href="putil_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>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ff0832db73c1f3a4ad67ede3f9360964"></a><!-- doxytag: member="putil.h::IEEE_754" ref="ff0832db73c1f3a4ad67ede3f9360964" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="putil_8h.html#ff0832db73c1f3a4ad67ede3f9360964">IEEE_754</a>&nbsp;&nbsp;&nbsp;1</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="putil_8h.html#6970542c7650516dbe1e6217029a3993">U_FILE_SEP_CHAR</a>&nbsp;&nbsp;&nbsp;'/'</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Filesystem file and path separator characters.  <a href="#6970542c7650516dbe1e6217029a3993"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="114c2d6d9b25b2223d89a28566749a11"></a><!-- doxytag: member="putil.h::U_FILE_ALT_SEP_CHAR" ref="114c2d6d9b25b2223d89a28566749a11" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="putil_8h.html#114c2d6d9b25b2223d89a28566749a11">U_FILE_ALT_SEP_CHAR</a>&nbsp;&nbsp;&nbsp;'/'</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ce0124279808029ec579ff465c11114f"></a><!-- doxytag: member="putil.h::U_PATH_SEP_CHAR" ref="ce0124279808029ec579ff465c11114f" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="putil_8h.html#ce0124279808029ec579ff465c11114f">U_PATH_SEP_CHAR</a>&nbsp;&nbsp;&nbsp;':'</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1b77d2e1ae42bf0f11563b09a86db389"></a><!-- doxytag: member="putil.h::U_FILE_SEP_STRING" ref="1b77d2e1ae42bf0f11563b09a86db389" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="putil_8h.html#1b77d2e1ae42bf0f11563b09a86db389">U_FILE_SEP_STRING</a>&nbsp;&nbsp;&nbsp;&quot;/&quot;</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5e16b8a448f1c73b8c6e2c268e45a50d"></a><!-- doxytag: member="putil.h::U_FILE_ALT_SEP_STRING" ref="5e16b8a448f1c73b8c6e2c268e45a50d" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="putil_8h.html#5e16b8a448f1c73b8c6e2c268e45a50d">U_FILE_ALT_SEP_STRING</a>&nbsp;&nbsp;&nbsp;&quot;/&quot;</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="36b0b2adb8fa8a779349c1dee87a4d56"></a><!-- doxytag: member="putil.h::U_PATH_SEP_STRING" ref="36b0b2adb8fa8a779349c1dee87a4d56" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="putil_8h.html#36b0b2adb8fa8a779349c1dee87a4d56">U_PATH_SEP_STRING</a>&nbsp;&nbsp;&nbsp;&quot;:&quot;</td></tr>

<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="putil_8h.html#fcb32663df26e03823b6971c55a213ac">u_getDataDirectory</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the ICU data directory.  <a href="#fcb32663df26e03823b6971c55a213ac"></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="putil_8h.html#62cc3492f2342dbb8f57296d7cecd3f0">u_setDataDirectory</a> (const char *directory)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the ICU data directory.  <a href="#62cc3492f2342dbb8f57296d7cecd3f0"></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="putil_8h.html#e8769c9385cf2d6b8762d569c32cc512">uprv_getDefaultCodepage</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Please use <a class="el" href="ucnv_8h.html#0f8721f3b8a0a3e1a774d8bf121cb559">ucnv_getDefaultName()</a> instead.  <a href="#e8769c9385cf2d6b8762d569c32cc512"></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="putil_8h.html#0b0243a6ff28430512a48c5c5dcf89a2">uprv_getDefaultLocaleID</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Please use <a class="el" href="uloc_8h.html#05fab60f12b103e270350f8b862a8b98">uloc_getDefault()</a> instead.  <a href="#0b0243a6ff28430512a48c5c5dcf89a2"></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="putil_8h.html#03379fe08a474116020299efc0506af5">u_charsToUChars</a> (const char *cs, UChar *us, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> <a class="el" href="ucnv_8h.html#885b7a4b123891f24dedd11fb6b2e641">length</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert char characters to UChar characters.  <a href="#03379fe08a474116020299efc0506af5"></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="putil_8h.html#1ce59871510f2ed887aecea7407d4c2f">u_UCharsToChars</a> (const UChar *us, char *cs, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> <a class="el" href="ucnv_8h.html#885b7a4b123891f24dedd11fb6b2e641">length</a>)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert UChar characters to char characters.  <a href="#1ce59871510f2ed887aecea7407d4c2f"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
C API: Platform Utilities. 
<p>

<p>
Definition in file <a class="el" href="putil_8h-source.html">putil.h</a>.<hr><h2>Define Documentation</h2>
<a class="anchor" name="6970542c7650516dbe1e6217029a3993"></a><!-- doxytag: member="putil.h::U_FILE_SEP_CHAR" ref="6970542c7650516dbe1e6217029a3993" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define U_FILE_SEP_CHAR&nbsp;&nbsp;&nbsp;'/'          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Filesystem file and path separator characters. 
<p>
Example: '/' and ':' on Unix, '\' and ';' on Windows. <dl compact><dt><b><a class="el" href="stable.html#_stable000219">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Definition at line <a class="el" href="putil_8h-source.html#l00133">133</a> of file <a class="el" href="putil_8h-source.html">putil.h</a>.
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="03379fe08a474116020299efc0506af5"></a><!-- doxytag: member="putil.h::u_charsToUChars" ref="03379fe08a474116020299efc0506af5" args="(const char *cs, UChar *us, int32_t length)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void u_charsToUChars           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>cs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">UChar *&nbsp;</td>
          <td class="paramname"> <em>us</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><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Convert char characters to UChar characters. 
<p>
This utility function is useful only for "invariant characters" that are encoded in the platform default encoding. They are a small, constant subset of the encoding and include just the latin letters, digits, and some punctuation. For details, see U_CHARSET_FAMILY.<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>cs</em>&nbsp;</td><td>Input string, points to <code>length</code> character bytes from a subset of the platform encoding. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>us</em>&nbsp;</td><td>Output string, points to memory for <code>length</code> Unicode characters. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>The number of characters to convert; this may include the terminating <code>NUL</code>.</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="utypes_8h.html#3ae4697420a1038d0860785f3215f696">U_CHARSET_FAMILY</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000220">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="fcb32663df26e03823b6971c55a213ac"></a><!-- doxytag: member="putil.h::u_getDataDirectory" ref="fcb32663df26e03823b6971c55a213ac" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* u_getDataDirectory           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the ICU data directory. 
<p>
The data directory is where common format ICU data files (.dat files) are loaded from. Note that normal use of the built-in ICU facilities does not require loading of an external data file; unless you are adding custom data to ICU, the data directory does not need to be set.<p>
The data directory is determined as follows: If <a class="el" href="putil_8h.html#62cc3492f2342dbb8f57296d7cecd3f0">u_setDataDirectory()</a> has been called, that is it, otherwise if the ICU_DATA environment variable is set, use that, otherwise If a data directory was specifed at ICU build time (define ICU_DATA_DIR "path"), use that, otherwise no data directory is available.<p>
<dl compact><dt><b>Returns:</b></dt><dd>the data directory, or an empty string ("") if no data directory has been specified.</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000217">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="62cc3492f2342dbb8f57296d7cecd3f0"></a><!-- doxytag: member="putil.h::u_setDataDirectory" ref="62cc3492f2342dbb8f57296d7cecd3f0" args="(const char *directory)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void u_setDataDirectory           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>directory</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the ICU data directory. 
<p>
The data directory is where common format ICU data files (.dat files) are loaded from. Note that normal use of the built-in ICU facilities does not require loading of an external data file; unless you are adding custom data to ICU, the data directory does not need to be set.<p>
This function should be called at most once in a process, before the first ICU operation (e.g., <a class="el" href="uclean_8h.html#d3c023068378725023389083c21c102b">u_init()</a>) that will require the loading of an ICU data file. This function is not thread-safe. Use it before calling ICU APIs from multiple threads.<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>directory</em>&nbsp;</td><td>The directory to be set.</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="uclean_8h.html#d3c023068378725023389083c21c102b">u_init</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000218">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="1ce59871510f2ed887aecea7407d4c2f"></a><!-- doxytag: member="putil.h::u_UCharsToChars" ref="1ce59871510f2ed887aecea7407d4c2f" args="(const UChar *us, char *cs, int32_t length)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void u_UCharsToChars           </td>
          <td>(</td>
          <td class="paramtype">const UChar *&nbsp;</td>
          <td class="paramname"> <em>us</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>cs</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><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Convert UChar characters to char characters. 
<p>
This utility function is useful only for "invariant characters" that can be encoded in the platform default encoding. They are a small, constant subset of the encoding and include just the latin letters, digits, and some punctuation. For details, see U_CHARSET_FAMILY.<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>us</em>&nbsp;</td><td>Input string, points to <code>length</code> Unicode characters that can be encoded with the codepage-invariant subset of the platform encoding. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cs</em>&nbsp;</td><td>Output string, points to memory for <code>length</code> character bytes. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>The number of characters to convert; this may include the terminating <code>NUL</code>.</td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="utypes_8h.html#3ae4697420a1038d0860785f3215f696">U_CHARSET_FAMILY</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000221">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="e8769c9385cf2d6b8762d569c32cc512"></a><!-- doxytag: member="putil.h::uprv_getDefaultCodepage" ref="e8769c9385cf2d6b8762d569c32cc512" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* uprv_getDefaultCodepage           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Please use <a class="el" href="ucnv_8h.html#0f8721f3b8a0a3e1a774d8bf121cb559">ucnv_getDefaultName()</a> instead. 
<p>
Return the default codepage for this platform and locale. This function can call setlocale() on Unix platforms. Please read the platform documentation on setlocale() before calling this function. <dl compact><dt><b>Returns:</b></dt><dd>the default codepage for this platform </dd></dl>
<dl compact><dt><b><a class="el" href="internal.html#_internal000011">Internal:</a></b></dt><dd>Do not use. This API is for interal use only.  </dd></dl>

</div>
</div><p>
<a class="anchor" name="0b0243a6ff28430512a48c5c5dcf89a2"></a><!-- doxytag: member="putil.h::uprv_getDefaultLocaleID" ref="0b0243a6ff28430512a48c5c5dcf89a2" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* uprv_getDefaultLocaleID           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Please use <a class="el" href="uloc_8h.html#05fab60f12b103e270350f8b862a8b98">uloc_getDefault()</a> instead. 
<p>
Return the default locale ID string by querying ths system, or zero if one cannot be found. This function can call setlocale() on Unix platforms. Please read the platform documentation on setlocale() before calling this function. <dl compact><dt><b>Returns:</b></dt><dd>the default locale ID string </dd></dl>
<dl compact><dt><b><a class="el" href="internal.html#_internal000012">Internal:</a></b></dt><dd>Do not use. This API is for interal use only.  </dd></dl>

</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Tue Dec 13 17:29:51 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>