Debian Codegraph @

upstream/mageia-cauldron/man3pm/I18N::Collate.3pm

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "I18N::Collate 3pm"
61 .TH I18N::Collate 3pm 2023-12-22 "perl v5.42.0" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 I18N::Collate \- compare 8\-bit scalar data according to the current locale
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 .Vb 4
71 \& use I18N::Collate;
72 \& setlocale(LC_COLLATE, \*(Aqlocale\-of\-your\-choice\*(Aq);
73 \& $s1 = I18N::Collate\->new("scalar_data_1");
74 \& $s2 = I18N::Collate\->new("scalar_data_2");
75 .Ve
76 .SH DESCRIPTION
77 .IX Header "DESCRIPTION"
78 .Vb 1
79 \& ***
80 \&
81 \& WARNING: starting from the Perl version 5.003_06
82 \& the I18N::Collate interface for comparing 8\-bit scalar data
83 \& according to the current locale
84 \&
85 \& HAS BEEN DEPRECATED
86 \&
87 \& That is, please do not use it anymore for any new applications
88 \& and please migrate the old applications away from it because its
89 \& functionality was integrated into the Perl core language in the
90 \& release 5.003_06.
91 \&
92 \& See the perllocale manual page for further information.
93 \&
94 \& ***
95 .Ve
96 .PP
97 This module provides you with objects that will collate
98 according to your national character set, provided that the
99 POSIX \fBsetlocale()\fR function is supported on your system.
100 .PP
101 You can compare \f(CW$s1\fR and \f(CW$s2\fR above with
102 .PP
103 .Vb 1
104 \& $s1 le $s2
105 .Ve
106 .PP
107 to extract the data itself, you\*(Aqll need a dereference: $$s1
108 .PP
109 This module uses \fBPOSIX::setlocale()\fR. The basic collation conversion is
110 done by \fBstrxfrm()\fR which terminates at NUL characters being a decent C
111 routine. \fBcollate_xfrm()\fR handles embedded NUL characters gracefully.
112 .PP
113 The available locales depend on your operating system; try whether
114 \&\f(CW\*(C`locale \-a\*(C'\fR shows them or man pages for "locale" or "nlsinfo" or the
115 direct approach \f(CW\*(C`ls /usr/lib/nls/loc\*(C'\fR or \f(CW\*(C`ls /usr/lib/nls\*(C'\fR or
116 \&\f(CW\*(C`ls /usr/lib/locale\*(C'\fR. Not all the locales that your vendor supports
117 are necessarily installed: please consult your operating system\*(Aqs
118 documentation and possibly your local system administration. The
119 locale names are probably something like \f(CW\*(C`xx_XX.(ISO)?8859\-N\*(C'\fR or
120 \&\f(CW\*(C`xx_XX.(ISO)?8859N\*(C'\fR, for example \f(CW\*(C`fr_CH.ISO8859\-1\*(C'\fR is the Swiss (CH)
121 variant of French (fr), ISO Latin (8859) 1 (\-1) which is the Western
122 European character set.