Debian Codegraph @

upstream/debian-unstable/man3/I18N::Collate.3perl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (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 .\"
57 .IX Title "I18N::Collate 3perl"
58 .TH I18N::Collate 3perl 2025-11-16 "perl v5.40.1" "Perl Programmers Reference Guide"
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 I18N::Collate \- compare 8\-bit scalar data according to the current locale
65 .SH SYNOPSIS
66 .IX Header "SYNOPSIS"
67 .Vb 4
68 \& use I18N::Collate;
69 \& setlocale(LC_COLLATE, \*(Aqlocale\-of\-your\-choice\*(Aq);
70 \& $s1 = I18N::Collate\->new("scalar_data_1");
71 \& $s2 = I18N::Collate\->new("scalar_data_2");
72 .Ve
73 .SH DESCRIPTION
74 .IX Header "DESCRIPTION"
75 .Vb 1
76 \& ***
77 \&
78 \& WARNING: starting from the Perl version 5.003_06
79 \& the I18N::Collate interface for comparing 8\-bit scalar data
80 \& according to the current locale
81 \&
82 \& HAS BEEN DEPRECATED
83 \&
84 \& That is, please do not use it anymore for any new applications
85 \& and please migrate the old applications away from it because its
86 \& functionality was integrated into the Perl core language in the
87 \& release 5.003_06.
88 \&
89 \& See the perllocale manual page for further information.
90 \&
91 \& ***
92 .Ve
93 .PP
94 This module provides you with objects that will collate
95 according to your national character set, provided that the
96 POSIX \fBsetlocale()\fR function is supported on your system.
97 .PP
98 You can compare \f(CW$s1\fR and \f(CW$s2\fR above with
99 .PP
100 .Vb 1
101 \& $s1 le $s2
102 .Ve
103 .PP
104 to extract the data itself, you'll need a dereference: $$s1
105 .PP
106 This module uses \fBPOSIX::setlocale()\fR. The basic collation conversion is
107 done by \fBstrxfrm()\fR which terminates at NUL characters being a decent C
108 routine. \fBcollate_xfrm()\fR handles embedded NUL characters gracefully.
109 .PP
110 The available locales depend on your operating system; try whether
111 \&\f(CW\*(C`locale \-a\*(C'\fR shows them or man pages for "locale" or "nlsinfo" or the
112 direct approach \f(CW\*(C`ls /usr/lib/nls/loc\*(C'\fR or \f(CW\*(C`ls /usr/lib/nls\*(C'\fR or
113 \&\f(CW\*(C`ls /usr/lib/locale\*(C'\fR. Not all the locales that your vendor supports
114 are necessarily installed: please consult your operating system's
115 documentation and possibly your local system administration. The
116 locale names are probably something like \f(CW\*(C`xx_XX.(ISO)?8859\-N\*(C'\fR or
117 \&\f(CW\*(C`xx_XX.(ISO)?8859N\*(C'\fR, for example \f(CW\*(C`fr_CH.ISO8859\-1\*(C'\fR is the Swiss (CH)
118 variant of French (fr), ISO Latin (8859) 1 (\-1) which is the Western
119 European character set.