This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Unicode-Collate to CPAN version 0.62
[perl5.git] / cpan / Unicode-Collate / README
1 Unicode/Collate version 0.62
2 ===============================
3
4 NAME
5
6   Unicode::Collate - Unicode Collation Algorithm
7
8 SYNOPSIS
9
10   use Unicode::Collate;
11
12   #construct
13   $Collator = Unicode::Collate->new(%tailoring);
14
15   #sort
16   @sorted = $Collator->sort(@not_sorted);
17
18   #compare
19   $result = $Collator->cmp($a, $b); # returns 1, 0, or -1.
20   $result = $Collator->eq($a, $b);  # returns true/false
21     (similarly ->ne, ->lt, ->le, ->gt, ->ge)
22
23 INSTALL
24
25   Perl 5.6.1 or later is required.
26   Perl 5.8.1 or later is recommended.
27
28   Though this distribution contains a subset of an old DUCET, named
29   "keys.txt", this one is intended only for doing a test of this module
30   and practically useless for any other purpose.
31
32   Installation of Unicode::Collate::Locale requires Collate/Locale.pm,
33   Collate/Locale/*.pm and Collate/allkeys.txt.  On building,
34   Unicode::Collate::Locale doesn't require data/*.txt and mklocale.
35   Tests for Unicode::Collate::Locale are named t/loc_*.t.
36
37 To install this module type the following:
38
39    perl Makefile.PL
40    make
41    make test
42    make install
43
44 If you have a C compiler and want to use XSUB edition,
45 type the following (!! "enableXS" must run before "Makefile.PL" !!):
46
47    perl enableXS
48    perl Makefile.PL
49    make
50    make test
51    make install
52
53 If you decide to install pure Perl (i.e. non-XS) edition after trying
54 to build XSUB, type the following:
55
56    make clean
57    perl disableXS
58    perl Makefile.PL
59    make
60    make test
61    make install
62
63 DEPENDENCIES
64
65   The conformant collation requires Unicode::Normalize (v 0.10 or later)
66   although Unicode::Collate can be used without Unicode::Normalize.
67
68 ABOUT DUCET
69
70   Though this module can be used without any C<table> file,
71   to use this module easily, it is recommended to install a table file
72   in the UCA format, by copying it under the directory
73   <a place in @INC>/Unicode/Collate.
74
75   You can install such a table file by adding it to "Collate" directory
76   (where "keys.txt" is placed) in this distribution before executing
77   Makefile.PL.
78
79   The most preferable one is "The Default Unicode Collation Element Table"
80   (aka DUCET), available from the Unicode Consortium's website:
81
82    http://www.unicode.org/Public/UCA/
83
84    http://www.unicode.org/Public/UCA/latest/allkeys.txt (latest version)
85
86   If DUCET is not installed, it is recommended to copy the file
87   from http://www.unicode.org/Public/UCA/latest/allkeys.txt
88   to <a place in @INC>/Unicode/Collate/allkeys.txt manually.
89
90 AUTHOR, COPYRIGHT AND LICENSE
91
92 The Unicode::Collate module for perl was written by SADAHIRO Tomoyuki,
93 <SADAHIRO@cpan.org>. This module is Copyright(C) 2001-2010,
94 SADAHIRO Tomoyuki. Japan. All rights reserved.
95
96 This module is free software; you can redistribute it and/or
97 modify it under the same terms as Perl itself.
98
99 The file Unicode/Collate/allkeys.txt was copied verbatim
100 from http://www.unicode.org/Public/UCA/5.2.0/allkeys.txt
101 This file is Copyright (c) 1991-2009 Unicode, Inc. All rights reserved.
102 Distributed under the Terms of Use in http://www.unicode.org/copyright.html