This repository has been archived by the owner on May 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
87 lines (61 loc) · 2.61 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Unicode/Collate version 0.53
========================================================
!!! NB: THIS IS A NON OFFICIAL FORK FROM v0.52 on CPAN
!!! See Changes for details
========================================================
NAME
Unicode::Collate - Unicode Collation Algorithm
SYNOPSIS
use Unicode::Collate;
#construct
$Collator = Unicode::Collate->new(%tailoring);
#sort
@sorted = $Collator->sort(@not_sorted);
#compare
$result = $Collator->cmp($a, $b); # returns 1, 0, or -1.
$result = $Collator->eq($a, $b); # returns true/false
(similarly ->ne, ->lt, ->le, ->gt, ->ge)
INSTALL
Perl 5.6.1 or later is required.
Perl 5.8.1 or later is recommended.
Though this module can be used without any C<table> file,
to use this module easily, it is recommended to install a table file
in the UCA format, by copying it under the directory
<a place in @INC>/Unicode/Collate.
You can install such a table file by adding it
to "Collate" directory (where "keys.txt" is placed) in this distribution
before executing Makefile.PL.
The most preferable one is "The Default Unicode Collation Element Table"
(aka DUCET), available from the Unicode Consortium's website:
http://www.unicode.org/Public/UCA/
http://www.unicode.org/Public/UCA/latest/allkeys.txt (latest version)
If DUCET is not installed, it is recommended to copy the file
from http://www.unicode.org/Public/UCA/latest/allkeys.txt
to <a place in @INC>/Unicode/Collate/allkeys.txt
manually.
Though this distribution contains a subset of allkeys.txt, named "keys.txt",
this one is intended only for doing a test of this module
and practically useless for any other purpose.
To install this module type the following:
perl Makefile.PL
make
make test
make install
DEPENDENCIES
The conformant collation requires Unicode::Normalize (v 0.10 or later)
although Unicode::Collate can be used without Unicode::Normalize.
Version 0.53 add the following requirements (all in core perl):
- GDBM_File
- Storable
- Unicode::UCD
AUTHOR, COPYRIGHT AND LICENSE
The Unicode::Collate module for perl was written by SADAHIRO Tomoyuki,
<SADAHIRO@cpan.org>. This module is Copyright(C) 2001-2005,
SADAHIRO Tomoyuki. Japan. All rights reserved.
This forked version by François Charette, (C) 2010.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
The file lib/Unicode/Collate/allkeys.txt was copied directly
from http://www.unicode.org/Public/UCA/5.2.0/allkeys.txt
This file is Copyright (c) 1991-2009 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in http://www.unicode.org/terms_of_use.html