📄 collate.html
字号:
<?xml version="1.0" ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<!-- saved from url=(0017)http://localhost/ -->
<script language="JavaScript" src="../../displayToc.js"></script>
<script language="JavaScript" src="../../tocParas.js"></script>
<script language="JavaScript" src="../../tocTab.js"></script>
<link rel="stylesheet" type="text/css" href="../../scineplex.css">
<title>I18N::Collate - compare 8-bit scalar data according to the current locale</title>
<link rel="stylesheet" href="../../Active.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>
<body>
<script>writelinks('__top__',2);</script>
<h1><a>I18N::Collate - compare 8-bit scalar data according to the current locale</a></h1>
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>I18N::Collate - compare 8-bit scalar data according to the current locale</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
<span class="keyword">use</span> <span class="variable">I18N::Collate</span><span class="operator">;</span>
<span class="variable">setlocale</span><span class="operator">(</span><span class="variable">LC_COLLATE</span><span class="operator">,</span> <span class="string">'locale-of-your-choice'</span><span class="operator">);</span>
<span class="variable">$s1</span> <span class="operator">=</span> <span class="variable">new</span> <span class="variable">I18N::Collate</span> <span class="string">"scalar_data_1"</span><span class="operator">;</span>
<span class="variable">$s2</span> <span class="operator">=</span> <span class="variable">new</span> <span class="variable">I18N::Collate</span> <span class="string">"scalar_data_2"</span><span class="operator">;</span>
</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<pre>
***</pre>
<pre>
WARNING: starting from the Perl version 5.003_06
the I18N::Collate interface for comparing 8-bit scalar data
according to the current locale</pre>
<pre>
HAS BEEN DEPRECATED</pre>
<pre>
That is, please do not use it anymore for any new applications
and please migrate the old applications away from it because its
functionality was integrated into the Perl core language in the
release 5.003_06.</pre>
<pre>
See the <a href="../../lib/Pod/perllocale.html">perllocale</a> manual page for further information.</pre>
<pre>
***</pre>
<p>This module provides you with objects that will collate
according to your national character set, provided that the
POSIX <code>setlocale()</code> function is supported on your system.</p>
<p>You can compare $s1 and $s2 above with</p>
<pre>
$s1 le $s2</pre>
<p>to extract the data itself, you'll need a dereference: $$s1</p>
<p>This module uses POSIX::setlocale(). The basic collation conversion is
done by <code>strxfrm()</code> which terminates at NUL characters being a decent C
routine. <code>collate_xfrm()</code> handles embedded NUL characters gracefully.</p>
<p>The available locales depend on your operating system; try whether
<code>locale -a</code> shows them or man pages for "locale" or "nlsinfo" or the
direct approach <code>ls /usr/lib/nls/loc</code> or <code>ls /usr/lib/nls</code> or
<code>ls /usr/lib/locale</code>. Not all the locales that your vendor supports
are necessarily installed: please consult your operating system's
documentation and possibly your local system administration. The
locale names are probably something like <code>xx_XX.(ISO)?8859-N</code> or
<code>xx_XX.(ISO)?8859N</code>, for example <code>fr_CH.ISO8859-1</code> is the Swiss (CH)
variant of French (fr), ISO Latin (8859) 1 (-1) which is the Western
European character set.</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -