1I18N::Collate(3pm)     Perl Programmers Reference Guide     I18N::Collate(3pm)
2
3
4

NAME

6       I18N::Collate - compare 8-bit scalar data according to the current
7       locale
8

SYNOPSIS

10           use I18N::Collate;
11           setlocale(LC_COLLATE, 'locale-of-your-choice');
12           $s1 = I18N::Collate->new("scalar_data_1");
13           $s2 = I18N::Collate->new("scalar_data_2");
14

DESCRIPTION

16         ***
17
18         WARNING: starting from the Perl version 5.003_06
19         the I18N::Collate interface for comparing 8-bit scalar data
20         according to the current locale
21
22               HAS BEEN DEPRECATED
23
24         That is, please do not use it anymore for any new applications
25         and please migrate the old applications away from it because its
26         functionality was integrated into the Perl core language in the
27         release 5.003_06.
28
29         See the perllocale manual page for further information.
30
31         ***
32
33       This module provides you with objects that will collate according to
34       your national character set, provided that the POSIX setlocale()
35       function is supported on your system.
36
37       You can compare $s1 and $s2 above with
38
39           $s1 le $s2
40
41       to extract the data itself, you'll need a dereference: $$s1
42
43       This module uses POSIX::setlocale(). The basic collation conversion is
44       done by strxfrm() which terminates at NUL characters being a decent C
45       routine.  collate_xfrm() handles embedded NUL characters gracefully.
46
47       The available locales depend on your operating system; try whether
48       "locale -a" shows them or man pages for "locale" or "nlsinfo" or the
49       direct approach "ls /usr/lib/nls/loc" or "ls /usr/lib/nls" or "ls
50       /usr/lib/locale".  Not all the locales that your vendor supports are
51       necessarily installed: please consult your operating system's
52       documentation and possibly your local system administration.  The
53       locale names are probably something like "xx_XX.(ISO)?8859-N" or
54       "xx_XX.(ISO)?8859N", for example "fr_CH.ISO8859-1" is the Swiss (CH)
55       variant of French (fr), ISO Latin (8859) 1 (-1) which is the Western
56       European character set.
57
58
59
60perl v5.32.1                      2021-05-31                I18N::Collate(3pm)
Impressum