Commit | Line | Data |
abd1ec54 |
1 | Unicode/Collate version 0.33 |
45394607 |
2 | =============================== |
3 | |
caffd4cf |
4 | NAME |
45394607 |
5 | |
caffd4cf |
6 | Unicode::Collate - Unicode Collation Algorithm |
45394607 |
7 | |
8 | SYNOPSIS |
9 | |
10 | use Unicode::Collate; |
11 | |
12 | #construct |
5398038e |
13 | $Collator = Unicode::Collate->new(%tailoring); |
45394607 |
14 | |
15 | #sort |
5398038e |
16 | @sorted = $Collator->sort(@not_sorted); |
45394607 |
17 | |
18 | #compare |
5398038e |
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) |
45394607 |
22 | |
23 | INSTALLATION |
24 | |
4d36a948 |
25 | Perl 5.6.1 or later |
10d7ec48 |
26 | (recommended: Perl 5.8.0 or later) |
27 | |
28 | To use this module, it is recommended to install a table file |
29 | in the UCA format, by copying it into the directory |
30 | where F<Unicode/Collate.pm> is installed; |
31 | e.g. into F<perl/lib/Unicode/Collate/> directory |
32 | if you have F<perl/lib/Unicode/Collate.pm>. |
33 | |
34 | The most preferable one is "The Default Unicode Collation Element Table", |
35 | available from the Unicode consortium's website: |
36 | |
37 | http://www.unicode.org/Public/UCA/latest/allkeys.txt (latest version) |
38 | |
39 | Though this distribution contains a subset of allkeys.txt, named "keys.txt", |
40 | this one is intended only for doing a test of this module |
41 | and practically useless for any other purpose. |
45394607 |
42 | |
43 | To install this module type the following: |
44 | |
45 | perl Makefile.PL |
46 | make |
47 | make test |
48 | make install |
49 | |
abd1ec54 |
50 | (!! XSUB for Unicode::Collate is an EXPERIMENTAL support !!) |
10d7ec48 |
51 | If you have a C compiler and want to use XSUB edition, |
52 | type the following (!! "enableXS" must run before "Makefile.PL" !!): |
caffd4cf |
53 | |
10d7ec48 |
54 | perl enableXS |
55 | perl Makefile.PL |
56 | make |
57 | make test |
58 | make install |
caffd4cf |
59 | |
10d7ec48 |
60 | If you decide to install pure Perl (i.e. non-XS) edition after trying |
61 | to build XSUB, type the following: |
caffd4cf |
62 | |
10d7ec48 |
63 | make clean |
64 | perl disableXS |
65 | perl Makefile.PL |
66 | make |
67 | make test |
68 | make install |
caffd4cf |
69 | |
45394607 |
70 | DEPENDENCIES |
71 | |
0116f5dc |
72 | The conformant collation requires Unicode::Normalize (v 0.10 or later) |
809c7673 |
73 | although Unicode::Collate can be used without Unicode::Normalize. |
45394607 |
74 | |
75 | COPYRIGHT AND LICENCE |
76 | |
4d36a948 |
77 | SADAHIRO Tomoyuki <SADAHIRO@cpan.org> |
45394607 |
78 | |
79 | http://homepage1.nifty.com/nomenclator/perl/ |
80 | |
ae6aa562 |
81 | Copyright(C) 2001-2003, SADAHIRO Tomoyuki. Japan. All rights reserved. |
45394607 |
82 | |
809c7673 |
83 | This library is free software; you can redistribute it |
84 | and/or modify it under the same terms as Perl itself. |
45394607 |
85 | |