.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Unicode::Collate 3perl" .TH Unicode::Collate 3perl "2011-09-26" "perl v5.14.2" "Perl Programmers Reference Guide" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Unicode::Collate \- Unicode Collation Algorithm .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& 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. .Ve .PP \&\fBNote:\fR Strings in \f(CW@not_sorted\fR, \f(CW$a\fR and \f(CW$b\fR are interpreted according to Perl's Unicode support. See perlunicode, perluniintro, perlunitut, perlunifaq, utf8. Otherwise you can use \f(CW\*(C`preprocess\*(C'\fR or should decode them before. .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is an implementation of Unicode Technical Standard #10 (a.k.a. \s-1UTS\s0 #10) \- Unicode Collation Algorithm (a.k.a. \s-1UCA\s0). .SS "Constructor and Tailoring" .IX Subsection "Constructor and Tailoring" The \f(CW\*(C`new\*(C'\fR method returns a collator object. If \fInew()\fR is called with no parameters, the collator should do the default collation. .PP .Vb 10 \& $Collator = Unicode::Collate\->new( \& UCA_Version => $UCA_Version, \& alternate => $alternate, # alias for \*(Aqvariable\*(Aq \& backwards => $levelNumber, # or \e@levelNumbers \& entry => $element, \& hangul_terminator => $term_primary_weight, \& ignoreName => qr/$ignoreName/, \& ignoreChar => qr/$ignoreChar/, \& katakana_before_hiragana => $bool, \& level => $collationLevel, \& normalization => $normalization_form, \& overrideCJK => \e&overrideCJK, \& overrideHangul => \e&overrideHangul, \& preprocess => \e&preprocess, \& rearrange => \e@charList, \& suppress => \e@charList, \& table => $filename, \& undefName => qr/$undefName/, \& undefChar => qr/$undefChar/, \& upper_before_lower => $bool, \& variable => $variable, \& ); .Ve .IP "UCA_Version" 4 .IX Item "UCA_Version" If the revision (previously \*(L"tracking version\*(R") number of \s-1UCA\s0 is given, behavior of that revision is emulated on collating. If omitted, the return value of \f(CW\*(C`UCA_Version()\*(C'\fR is used. .Sp The following revisions are supported. The default is 22. .Sp .Vb 10 \& UCA Unicode Standard DUCET (@version) \& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \& 8 3.1 3.0.1 (3.0.1d9) \& 9 3.1 with Corrigendum 3 3.1.1 (3.1.1) \& 11 4.0 4.0.0 (4.0.0) \& 14 4.1.0 4.1.0 (4.1.0) \& 16 5.0 5.0.0 (5.0.0) \& 18 5.1.0 5.1.0 (5.1.0) \& 20 5.2.0 5.2.0 (5.2.0) \& 22 6.0.0 6.0.0 (6.0.0) .Ve .Sp * Noncharacters (e.g. U+FFFF) are not ignored, and can be overridden since \f(CW\*(C`UCA_Version\*(C'\fR 22. .Sp * Fully ignorable characters were ignored, and would not interrupt contractions with \f(CW\*(C`UCA_Version\*(C'\fR 9 and 11. .Sp * Treatment of ignorables after variables and some behaviors were changed at \f(CW\*(C`UCA_Version\*(C'\fR 9. .Sp * Characters regarded as \s-1CJK\s0 unified ideographs (cf. \f(CW\*(C`overrideCJK\*(C'\fR) depend on \f(CW\*(C`UCA_Version\*(C'\fR. .Sp * Many hangul jamo are assigned at \f(CW\*(C`UCA_Version\*(C'\fR 20, that will affect \&\f(CW\*(C`hangul_terminator\*(C'\fR. .IP "alternate" 4 .IX Item "alternate" \&\-\- see 3.2.2 Alternate Weighting, version 8 of \s-1UTS\s0 #10 .Sp For backward compatibility, \f(CW\*(C`alternate\*(C'\fR (old name) can be used as an alias for \f(CW\*(C`variable\*(C'\fR. .IP "backwards" 4 .IX Item "backwards" \&\-\- see 3.1.2 French Accents, \s-1UTS\s0 #10. .Sp .Vb 1 \& backwards => $levelNumber or \e@levelNumbers .Ve .Sp Weights in reverse order; ex. level 2 (diacritic ordering) in French. If omitted (or \f(CW$levelNumber\fR is \f(CW\*(C`undef\*(C'\fR or \f(CW\*(C`\e@levelNumbers\*(C'\fR is \f(CW\*(C`[]\*(C'\fR), forwards at all the levels. .IP "entry" 4 .IX Item "entry" \&\-\- see 3.1 Linguistic Features; 3.2.1 File Format, \s-1UTS\s0 #10. .Sp If the same character (or a sequence of characters) exists in the collation element table through \f(CW\*(C`table\*(C'\fR, mapping to collation elements is overridden. If it does not exist, the mapping is defined additionally. .Sp .Vb 12 \& entry => <<\*(AqENTRY\*(Aq, # for DUCET v4.0.0 (allkeys\-4.0.0.txt) \&0063 0068 ; [.0E6A.0020.0002.0063] # ch \&0043 0068 ; [.0E6A.0020.0007.0043] # Ch \&0043 0048 ; [.0E6A.0020.0008.0043] # CH \&006C 006C ; [.0F4C.0020.0002.006C] # ll \&004C 006C ; [.0F4C.0020.0007.004C] # Ll \&004C 004C ; [.0F4C.0020.0008.004C] # LL \&00F1 ; [.0F7B.0020.0002.00F1] # n\-tilde \&006E 0303 ; [.0F7B.0020.0002.00F1] # n\-tilde \&00D1 ; [.0F7B.0020.0008.00D1] # N\-tilde \&004E 0303 ; [.0F7B.0020.0008.00D1] # N\-tilde \&ENTRY \& \& entry => <<\*(AqENTRY\*(Aq, # for DUCET v4.0.0 (allkeys\-4.0.0.txt) \&00E6 ; [.0E33.0020.0002.00E6][.0E8B.0020.0002.00E6] # ae ligature as \&00C6 ; [.0E33.0020.0008.00C6][.0E8B.0020.0008.00C6] # AE ligature as \&ENTRY .Ve .Sp \&\fB\s-1NOTE:\s0\fR The code point in the \s-1UCA\s0 file format (before \f(CW\*(Aq;\*(Aq\fR) \&\fBmust\fR be a Unicode code point (defined as hexadecimal), but not a native code point. So \f(CW0063\fR must always denote \f(CW\*(C`U+0063\*(C'\fR, but not a character of \f(CW"\ex63"\fR. .Sp Weighting may vary depending on collation element table. So ensure the weights defined in \f(CW\*(C`entry\*(C'\fR will be consistent with those in the collation element table loaded via \f(CW\*(C`table\*(C'\fR. .Sp In \s-1DUCET\s0 v4.0.0, primary weight of \f(CW\*(C`C\*(C'\fR is \f(CW0E60\fR and that of \f(CW\*(C`D\*(C'\fR is \f(CW\*(C`0E6D\*(C'\fR. So setting primary weight of \f(CW\*(C`CH\*(C'\fR to \f(CW\*(C`0E6A\*(C'\fR (as a value between \f(CW0E60\fR and \f(CW\*(C`0E6D\*(C'\fR) makes ordering as \f(CW\*(C`C < CH < D\*(C'\fR. Exactly speaking \s-1DUCET\s0 already has some characters between \f(CW\*(C`C\*(C'\fR and \f(CW\*(C`D\*(C'\fR: \&\f(CW\*(C`small capital C\*(C'\fR (\f(CW\*(C`U+1D04\*(C'\fR) with primary weight \f(CW0E64\fR, \&\f(CW\*(C`c\-hook/C\-hook\*(C'\fR (\f(CW\*(C`U+0188/U+0187\*(C'\fR) with \f(CW0E65\fR, and \f(CW\*(C`c\-curl\*(C'\fR (\f(CW\*(C`U+0255\*(C'\fR) with \f(CW0E69\fR. Then primary weight \f(CW\*(C`0E6A\*(C'\fR for \f(CW\*(C`CH\*(C'\fR makes \f(CW\*(C`CH\*(C'\fR ordered between \f(CW\*(C`c\-curl\*(C'\fR and \f(CW\*(C`D\*(C'\fR. .IP "hangul_terminator" 4 .IX Item "hangul_terminator" \&\-\- see 7.1.4 Trailing Weights, \s-1UTS\s0 #10. .Sp If a true value is given (non-zero but should be positive), it will be added as a terminator primary weight to the end of every standard Hangul syllable. Secondary and any higher weights for terminator are set to zero. If the value is false or \f(CW\*(C`hangul_terminator\*(C'\fR key does not exist, insertion of terminator weights will not be performed. .Sp Boundaries of Hangul syllables are determined according to conjoining Jamo behavior in \fIthe Unicode Standard\fR and \fIHangulSyllableType.txt\fR. .Sp \&\fBImplementation Note:\fR (1) For expansion mapping (Unicode character mapped to a sequence of collation elements), a terminator will not be added between collation elements, even if Hangul syllable boundary exists there. Addition of terminator is restricted to the next position to the last collation element. .Sp (2) Non-conjoining Hangul letters (Compatibility Jamo, halfwidth Jamo, and enclosed letters) are not automatically terminated with a terminator primary weight. These characters may need terminator included in a collation element table beforehand. .IP "ignoreChar" 4 .IX Item "ignoreChar" .PD 0 .IP "ignoreName" 4 .IX Item "ignoreName" .PD \&\-\- see 3.2.2 Variable Weighting, \s-1UTS\s0 #10. .Sp Makes the entry in the table completely ignorable; i.e. as if the weights were zero at all level. .Sp Through \f(CW\*(C`ignoreChar\*(C'\fR, any character matching \f(CW\*(C`qr/$ignoreChar/\*(C'\fR will be ignored. Through \f(CW\*(C`ignoreName\*(C'\fR, any character whose name (given in the \f(CW\*(C`table\*(C'\fR file as a comment) matches \f(CW\*(C`qr/$ignoreName/\*(C'\fR will be ignored. .Sp E.g. when 'a' and 'e' are ignorable, \&'element' is equal to 'lament' (or 'lmnt'). .IP "katakana_before_hiragana" 4 .IX Item "katakana_before_hiragana" \&\-\- see 7.3.1 Tertiary Weight Table, \s-1UTS\s0 #10. .Sp By default, hiragana is before katakana. If the parameter is made true, this is reversed. .Sp \&\fB\s-1NOTE\s0\fR: This parameter simplemindedly assumes that any hiragana/katakana distinctions must occur in level 3, and their weights at level 3 must be same as those mentioned in 7.3.1, \s-1UTS\s0 #10. If you define your collation elements which violate this requirement, this parameter does not work validly. .IP "level" 4 .IX Item "level" \&\-\- see 4.3 Form Sort Key, \s-1UTS\s0 #10. .Sp Set the maximum level. Any higher levels than the specified one are ignored. .Sp .Vb 4 \& Level 1: alphabetic ordering \& Level 2: diacritic ordering \& Level 3: case ordering \& Level 4: tie\-breaking (e.g. in the case when variable is \*(Aqshifted\*(Aq) \& \& ex.level => 2, .Ve .Sp If omitted, the maximum is the 4th. .IP "normalization" 4 .IX Item "normalization" \&\-\- see 4.1 Normalize, \s-1UTS\s0 #10. .Sp If specified, strings are normalized before preparation of sort keys (the normalization is executed after preprocess). .Sp A form name \f(CW\*(C`Unicode::Normalize::normalize()\*(C'\fR accepts will be applied as \f(CW$normalization_form\fR. Acceptable names include \f(CW\*(AqNFD\*(Aq\fR, \f(CW\*(AqNFC\*(Aq\fR, \f(CW\*(AqNFKD\*(Aq\fR, and \f(CW\*(AqNFKC\*(Aq\fR. See \f(CW\*(C`Unicode::Normalize::normalize()\*(C'\fR for detail. If omitted, \f(CW\*(AqNFD\*(Aq\fR is used. .Sp \&\f(CW\*(C`normalization\*(C'\fR is performed after \f(CW\*(C`preprocess\*(C'\fR (if defined). .Sp Furthermore, special values, \f(CW\*(C`undef\*(C'\fR and \f(CW"prenormalized"\fR, can be used, though they are not concerned with \f(CW\*(C`Unicode::Normalize::normalize()\*(C'\fR. .Sp If \f(CW\*(C`undef\*(C'\fR (not a string \f(CW"undef"\fR) is passed explicitly as the value for this key, any normalization is not carried out (this may make tailoring easier if any normalization is not desired). Under \f(CW\*(C`(normalization => undef)\*(C'\fR, only contiguous contractions are resolved; e.g. even if \f(CW\*(C`A\-ring\*(C'\fR (and \f(CW\*(C`A\-ring\-cedilla\*(C'\fR) is ordered after \f(CW\*(C`Z\*(C'\fR, \&\f(CW\*(C`A\-cedilla\-ring\*(C'\fR would be primary equal to \f(CW\*(C`A\*(C'\fR. In this point, \&\f(CW\*(C`(normalization => undef, preprocess => sub { NFD(shift) })\*(C'\fR \&\fBis not\fR equivalent to \f(CW\*(C`(normalization => \*(AqNFD\*(Aq)\*(C'\fR. .Sp In the case of \f(CW\*(C`(normalization => "prenormalized")\*(C'\fR, any normalization is not performed, but discontiguous contractions with combining characters are performed. Therefore \&\f(CW\*(C`(normalization => \*(Aqprenormalized\*(Aq, preprocess => sub { NFD(shift) })\*(C'\fR \&\fBis\fR equivalent to \f(CW\*(C`(normalization => \*(AqNFD\*(Aq)\*(C'\fR. If source strings are finely prenormalized, \&\f(CW\*(C`(normalization => \*(Aqprenormalized\*(Aq)\*(C'\fR may save time for normalization. .Sp Except \f(CW\*(C`(normalization => undef)\*(C'\fR, \&\fBUnicode::Normalize\fR is required (see also \fB\s-1CAVEAT\s0\fR). .IP "overrideCJK" 4 .IX Item "overrideCJK" \&\-\- see 7.1 Derived Collation Elements, \s-1UTS\s0 #10. .Sp By default, \s-1CJK\s0 unified ideographs are ordered in Unicode codepoint order, but those in the \s-1CJK\s0 Unified Ideographs block are lesser than those in the \s-1CJK\s0 Unified Ideographs Extension A etc. .Sp .Vb 5 \& In the CJK Unified Ideographs block: \& U+4E00..U+9FA5 if UCA_Version is 8 to 11. \& U+4E00..U+9FBB if UCA_Version is 14 to 16. \& U+4E00..U+9FC3 if UCA_Version is 18. \& U+4E00..U+9FCB if UCA_Version is 20 or greater. \& \& In the CJK Unified Ideographs Extension blocks: \& Ext.A (U+3400..U+4DB5) and Ext.B (U+20000..U+2A6D6) in any UCA_Version. \& Ext.C (U+2A700..U+2B734) if UCA_Version is 20 or greater. \& Ext.D (U+2B740..U+2B81D) if UCA_Version is 22 or greater. .Ve .Sp Through \f(CW\*(C`overrideCJK\*(C'\fR, ordering of \s-1CJK\s0 unified ideographs (including extensions) can be overridden. .Sp ex. \s-1CJK\s0 unified ideographs in the \s-1JIS\s0 code point order. .Sp .Vb 7 \& overrideCJK => sub { \& my $u = shift; # get a Unicode codepoint \& my $b = pack(\*(Aqn\*(Aq, $u); # to UTF\-16BE \& my $s = your_unicode_to_sjis_converter($b); # convert \& my $n = unpack(\*(Aqn\*(Aq, $s); # convert sjis to short \& [ $n, 0x20, 0x2, $u ]; # return the collation element \& }, .Ve .Sp The return value may be an arrayref of 1st to 4th weights as shown above. The return value may be an integer as the primary weight as shown below. If \f(CW\*(C`undef\*(C'\fR is returned, the default derived collation element will be used. .Sp .Vb 7 \& overrideCJK => sub { \& my $u = shift; # get a Unicode codepoint \& my $b = pack(\*(Aqn\*(Aq, $u); # to UTF\-16BE \& my $s = your_unicode_to_sjis_converter($b); # convert \& my $n = unpack(\*(Aqn\*(Aq, $s); # convert sjis to short \& return $n; # return the primary weight \& }, .Ve .Sp The return value may be a list containing zero or more of an arrayref, an integer, or \f(CW\*(C`undef\*(C'\fR. .Sp ex. ignores all \s-1CJK\s0 unified ideographs. .Sp .Vb 1 \& overrideCJK => sub {()}, # CODEREF returning empty list \& \& # where \->eq("Pe\ex{4E00}rl", "Perl") is true \& # as U+4E00 is a CJK unified ideograph and to be ignorable. .Ve .Sp If \f(CW\*(C`undef\*(C'\fR is passed explicitly as the value for this key, weights for \s-1CJK\s0 unified ideographs are treated as undefined. But assignment of weight for \s-1CJK\s0 unified ideographs in \f(CW\*(C`table\*(C'\fR or \f(CW\*(C`entry\*(C'\fR is still valid. .Sp \&\fBNote:\fR In addition to them, 12 \s-1CJK\s0 compatibility ideographs (\f(CW\*(C`U+FA0E\*(C'\fR, \&\f(CW\*(C`U+FA0F\*(C'\fR, \f(CW\*(C`U+FA11\*(C'\fR, \f(CW\*(C`U+FA13\*(C'\fR, \f(CW\*(C`U+FA14\*(C'\fR, \f(CW\*(C`U+FA1F\*(C'\fR, \f(CW\*(C`U+FA21\*(C'\fR, \f(CW\*(C`U+FA23\*(C'\fR, \&\f(CW\*(C`U+FA24\*(C'\fR, \f(CW\*(C`U+FA27\*(C'\fR, \f(CW\*(C`U+FA28\*(C'\fR, \f(CW\*(C`U+FA29\*(C'\fR) are also treated as \s-1CJK\s0 unified ideographs. But they can't be overridden via \f(CW\*(C`overrideCJK\*(C'\fR when you use \&\s-1DUCET\s0, as the table includes weights for them. \f(CW\*(C`table\*(C'\fR or \f(CW\*(C`entry\*(C'\fR has priority over \f(CW\*(C`overrideCJK\*(C'\fR. .IP "overrideHangul" 4 .IX Item "overrideHangul" \&\-\- see 7.1 Derived Collation Elements, \s-1UTS\s0 #10. .Sp By default, Hangul syllables are decomposed into Hangul Jamo, even if \f(CW\*(C`(normalization => undef)\*(C'\fR. But the mapping of Hangul syllables may be overridden. .Sp This parameter works like \f(CW\*(C`overrideCJK\*(C'\fR, so see there for examples. .Sp If you want to override the mapping of Hangul syllables, \&\s-1NFD\s0 and \s-1NFKD\s0 are not appropriate, since \s-1NFD\s0 and \s-1NFKD\s0 will decompose Hangul syllables before overriding. \s-1FCD\s0 may decompose Hangul syllables as the case may be. .Sp If \f(CW\*(C`undef\*(C'\fR is passed explicitly as the value for this key, weight for Hangul syllables is treated as undefined without decomposition into Hangul Jamo. But definition of weight for Hangul syllables in \f(CW\*(C`table\*(C'\fR or \f(CW\*(C`entry\*(C'\fR is still valid. .IP "preprocess" 4 .IX Item "preprocess" \&\-\- see 5.1 Preprocessing, \s-1UTS\s0 #10. .Sp If specified, the coderef is used to preprocess before the formation of sort keys. .Sp ex. dropping English articles, such as \*(L"a\*(R" or \*(L"the\*(R". Then, \*(L"the pen\*(R" is before \*(L"a pencil\*(R". .Sp .Vb 5 \& preprocess => sub { \& my $str = shift; \& $str =~ s/\eb(?:an?|the)\es+//gi; \& return $str; \& }, .Ve .Sp \&\f(CW\*(C`preprocess\*(C'\fR is performed before \f(CW\*(C`normalization\*(C'\fR (if defined). .Sp ex. decoding strings in a legacy encoding such as shift-jis: .Sp .Vb 4 \& $sjis_collator = Unicode::Collate\->new( \& preprocess => \e&your_shiftjis_to_unicode_decoder, \& ); \& @result = $sjis_collator\->sort(@shiftjis_strings); .Ve .Sp \&\fBNote:\fR Strings returned from the coderef will be interpreted according to Perl's Unicode support. See perlunicode, perluniintro, perlunitut, perlunifaq, utf8. .IP "rearrange" 4 .IX Item "rearrange" \&\-\- see 3.1.3 Rearrangement, \s-1UTS\s0 #10. .Sp Characters that are not coded in logical order and to be rearranged. If \f(CW\*(C`UCA_Version\*(C'\fR is equal to or lesser than 11, default is: .Sp .Vb 1 \& rearrange => [ 0x0E40..0x0E44, 0x0EC0..0x0EC4 ], .Ve .Sp If you want to disallow any rearrangement, pass \f(CW\*(C`undef\*(C'\fR or \f(CW\*(C`[]\*(C'\fR (a reference to empty list) as the value for this key. .Sp If \f(CW\*(C`UCA_Version\*(C'\fR is equal to or greater than 14, default is \f(CW\*(C`[]\*(C'\fR (i.e. no rearrangement). .Sp \&\fBAccording to the version 9 of \s-1UCA\s0, this parameter shall not be used; but it is not warned at present.\fR .IP "suppress" 4 .IX Item "suppress" \&\-\- see suppress contractions in 5.14.11 Special-Purpose Commands, \&\s-1UTS\s0 #35 (\s-1LDML\s0). .Sp Contractions beginning with the specified characters are suppressed, even if those contractions are defined in \f(CW\*(C`table\*(C'\fR or \f(CW\*(C`entry\*(C'\fR. .Sp An example for Russian and some languages using the Cyrillic script: .Sp .Vb 1 \& suppress => [0x0400..0x0417, 0x041A..0x0437, 0x043A..0x045F], .Ve .Sp where 0x0400 stands for \f(CW\*(C`U+0400\*(C'\fR, \s-1CYRILLIC\s0 \s-1CAPITAL\s0 \s-1LETTER\s0 \s-1IE\s0 \s-1WITH\s0 \s-1GRAVE\s0. .IP "table" 4 .IX Item "table" \&\-\- see 3.2 Default Unicode Collation Element Table, \s-1UTS\s0 #10. .Sp You can use another collation element table if desired. .Sp The table file should locate in the \fIUnicode/Collate\fR directory on \f(CW@INC\fR. Say, if the filename is \fIFoo.txt\fR, the table file is searched as \fIUnicode/Collate/Foo.txt\fR in \f(CW@INC\fR. .Sp By default, \fIallkeys.txt\fR (as the filename of \s-1DUCET\s0) is used. If you will prepare your own table file, any name other than \fIallkeys.txt\fR may be better to avoid namespace conflict. .Sp \&\fB\s-1NOTE\s0\fR: When \s-1XSUB\s0 is used, the \s-1DUCET\s0 is compiled on building this module, and it may save time at the run time. Explicit saying \f(CW\*(C`table => \*(Aqallkeys.txt\*(Aq\*(C'\fR (or using another table), or using \f(CW\*(C`ignoreChar\*(C'\fR, \f(CW\*(C`ignoreName\*(C'\fR, \f(CW\*(C`undefChar\*(C'\fR, or \f(CW\*(C`undefName\*(C'\fR will prevent this module from using the compiled \s-1DUCET\s0. .Sp If \f(CW\*(C`undef\*(C'\fR is passed explicitly as the value for this key, no file is read (but you can define collation elements via \f(CW\*(C`entry\*(C'\fR). .Sp A typical way to define a collation element table without any file of table: .Sp .Vb 11 \& $onlyABC = Unicode::Collate\->new( \& table => undef, \& entry => << \*(AqENTRIES\*(Aq, \&0061 ; [.0101.0020.0002.0061] # LATIN SMALL LETTER A \&0041 ; [.0101.0020.0008.0041] # LATIN CAPITAL LETTER A \&0062 ; [.0102.0020.0002.0062] # LATIN SMALL LETTER B \&0042 ; [.0102.0020.0008.0042] # LATIN CAPITAL LETTER B \&0063 ; [.0103.0020.0002.0063] # LATIN SMALL LETTER C \&0043 ; [.0103.0020.0008.0043] # LATIN CAPITAL LETTER C \&ENTRIES \& ); .Ve .Sp If \f(CW\*(C`ignoreName\*(C'\fR or \f(CW\*(C`undefName\*(C'\fR is used, character names should be specified as a comment (following \f(CW\*(C`#\*(C'\fR) on each line. .IP "undefChar" 4 .IX Item "undefChar" .PD 0 .IP "undefName" 4 .IX Item "undefName" .PD \&\-\- see 6.3.4 Reducing the Repertoire, \s-1UTS\s0 #10. .Sp Undefines the collation element as if it were unassigned in the \f(CW\*(C`table\*(C'\fR. This reduces the size of the table. If an unassigned character appears in the string to be collated, the sort key is made from its codepoint as a single-character collation element, as it is greater than any other assigned collation elements (in the codepoint order among the unassigned characters). But, it'd be better to ignore characters unfamiliar to you and maybe never used. .Sp Through \f(CW\*(C`undefChar\*(C'\fR, any character matching \f(CW\*(C`qr/$undefChar/\*(C'\fR will be undefined. Through \f(CW\*(C`undefName\*(C'\fR, any character whose name (given in the \f(CW\*(C`table\*(C'\fR file as a comment) matches \f(CW\*(C`qr/$undefName/\*(C'\fR will be undefined. .Sp ex. Collation weights for beyond-BMP characters are not stored in object: .Sp .Vb 1 \& undefChar => qr/[^\e0\-\ex{fffd}]/, .Ve .IP "upper_before_lower" 4 .IX Item "upper_before_lower" \&\-\- see 6.6 Case Comparisons, \s-1UTS\s0 #10. .Sp By default, lowercase is before uppercase. If the parameter is made true, this is reversed. .Sp \&\fB\s-1NOTE\s0\fR: This parameter simplemindedly assumes that any lowercase/uppercase distinctions must occur in level 3, and their weights at level 3 must be same as those mentioned in 7.3.1, \s-1UTS\s0 #10. If you define your collation elements which differs from this requirement, this parameter doesn't work validly. .IP "variable" 4 .IX Item "variable" \&\-\- see 3.2.2 Variable Weighting, \s-1UTS\s0 #10. .Sp This key allows to variable weighting for variable collation elements, which are marked with an \s-1ASTERISK\s0 in the table (\s-1NOTE:\s0 Many punctuation marks and symbols are variable in \fIallkeys.txt\fR). .Sp .Vb 1 \& variable => \*(Aqblanked\*(Aq, \*(Aqnon\-ignorable\*(Aq, \*(Aqshifted\*(Aq, or \*(Aqshift\-trimmed\*(Aq. .Ve .Sp These names are case-insensitive. By default (if specification is omitted), 'shifted' is adopted. .Sp .Vb 2 \& \*(AqBlanked\*(Aq Variable elements are made ignorable at levels 1 through 3; \& considered at the 4th level. \& \& \*(AqNon\-Ignorable\*(Aq Variable elements are not reset to ignorable. \& \& \*(AqShifted\*(Aq Variable elements are made ignorable at levels 1 through 3 \& their level 4 weight is replaced by the old level 1 weight. \& Level 4 weight for Non\-Variable elements is 0xFFFF. \& \& \*(AqShift\-Trimmed\*(Aq Same as \*(Aqshifted\*(Aq, but all FFFF\*(Aqs at the 4th level \& are trimmed. .Ve .SS "Methods for Collation" .IX Subsection "Methods for Collation" .ie n .IP """@sorted = $Collator\->sort(@not_sorted)""" 4 .el .IP "\f(CW@sorted = $Collator\->sort(@not_sorted)\fR" 4 .IX Item "@sorted = $Collator->sort(@not_sorted)" Sorts a list of strings. .ie n .IP """$result = $Collator\->cmp($a, $b)""" 4 .el .IP "\f(CW$result = $Collator\->cmp($a, $b)\fR" 4 .IX Item "$result = $Collator->cmp($a, $b)" Returns 1 (when \f(CW$a\fR is greater than \f(CW$b\fR) or 0 (when \f(CW$a\fR is equal to \f(CW$b\fR) or \-1 (when \f(CW$a\fR is lesser than \f(CW$b\fR). .ie n .IP """$result = $Collator\->eq($a, $b)""" 4 .el .IP "\f(CW$result = $Collator\->eq($a, $b)\fR" 4 .IX Item "$result = $Collator->eq($a, $b)" .PD 0 .ie n .IP """$result = $Collator\->ne($a, $b)""" 4 .el .IP "\f(CW$result = $Collator\->ne($a, $b)\fR" 4 .IX Item "$result = $Collator->ne($a, $b)" .ie n .IP """$result = $Collator\->lt($a, $b)""" 4 .el .IP "\f(CW$result = $Collator\->lt($a, $b)\fR" 4 .IX Item "$result = $Collator->lt($a, $b)" .ie n .IP """$result = $Collator\->le($a, $b)""" 4 .el .IP "\f(CW$result = $Collator\->le($a, $b)\fR" 4 .IX Item "$result = $Collator->le($a, $b)" .ie n .IP """$result = $Collator\->gt($a, $b)""" 4 .el .IP "\f(CW$result = $Collator\->gt($a, $b)\fR" 4 .IX Item "$result = $Collator->gt($a, $b)" .ie n .IP """$result = $Collator\->ge($a, $b)""" 4 .el .IP "\f(CW$result = $Collator\->ge($a, $b)\fR" 4 .IX Item "$result = $Collator->ge($a, $b)" .PD They works like the same name operators as theirs. .Sp .Vb 6 \& eq : whether $a is equal to $b. \& ne : whether $a is not equal to $b. \& lt : whether $a is lesser than $b. \& le : whether $a is lesser than $b or equal to $b. \& gt : whether $a is greater than $b. \& ge : whether $a is greater than $b or equal to $b. .Ve .ie n .IP """$sortKey = $Collator\->getSortKey($string)""" 4 .el .IP "\f(CW$sortKey = $Collator\->getSortKey($string)\fR" 4 .IX Item "$sortKey = $Collator->getSortKey($string)" \&\-\- see 4.3 Form Sort Key, \s-1UTS\s0 #10. .Sp Returns a sort key. .Sp You compare the sort keys using a binary comparison and get the result of the comparison of the strings using \s-1UCA\s0. .Sp .Vb 1 \& $Collator\->getSortKey($a) cmp $Collator\->getSortKey($b) \& \& is equivalent to \& \& $Collator\->cmp($a, $b) .Ve .ie n .IP """$sortKeyForm = $Collator\->viewSortKey($string)""" 4 .el .IP "\f(CW$sortKeyForm = $Collator\->viewSortKey($string)\fR" 4 .IX Item "$sortKeyForm = $Collator->viewSortKey($string)" Converts a sorting key into its representation form. If \f(CW\*(C`UCA_Version\*(C'\fR is 8, the output is slightly different. .Sp .Vb 3 \& use Unicode::Collate; \& my $c = Unicode::Collate\->new(); \& print $c\->viewSortKey("Perl"),"\en"; \& \& # output: \& # [0B67 0A65 0B7F 0B03 | 0020 0020 0020 0020 | 0008 0002 0002 0002 | FFFF FFFF FFFF FFFF] \& # Level 1 Level 2 Level 3 Level 4 .Ve .SS "Methods for Searching" .IX Subsection "Methods for Searching" \&\fB\s-1DISCLAIMER:\s0\fR If \f(CW\*(C`preprocess\*(C'\fR or \f(CW\*(C`normalization\*(C'\fR parameter is true for \f(CW$Collator\fR, calling these methods (\f(CW\*(C`index\*(C'\fR, \f(CW\*(C`match\*(C'\fR, \f(CW\*(C`gmatch\*(C'\fR, \&\f(CW\*(C`subst\*(C'\fR, \f(CW\*(C`gsubst\*(C'\fR) is croaked, as the position and the length might differ from those on the specified string. (And \f(CW\*(C`rearrange\*(C'\fR and \f(CW\*(C`hangul_terminator\*(C'\fR parameters are neglected.) .PP The \f(CW\*(C`match\*(C'\fR, \f(CW\*(C`gmatch\*(C'\fR, \f(CW\*(C`subst\*(C'\fR, \f(CW\*(C`gsubst\*(C'\fR methods work like \f(CW\*(C`m//\*(C'\fR, \f(CW\*(C`m//g\*(C'\fR, \f(CW\*(C`s///\*(C'\fR, \f(CW\*(C`s///g\*(C'\fR, respectively, but they are not aware of any pattern, but only a literal substring. .ie n .IP """$position = $Collator\->index($string, $substring[, $position])""" 4 .el .IP "\f(CW$position = $Collator\->index($string, $substring[, $position])\fR" 4 .IX Item "$position = $Collator->index($string, $substring[, $position])" .PD 0 .ie n .IP """($position, $length) = $Collator\->index($string, $substring[, $position])""" 4 .el .IP "\f(CW($position, $length) = $Collator\->index($string, $substring[, $position])\fR" 4 .IX Item "($position, $length) = $Collator->index($string, $substring[, $position])" .PD If \f(CW$substring\fR matches a part of \f(CW$string\fR, returns the position of the first occurrence of the matching part in scalar context; in list context, returns a two-element list of the position and the length of the matching part. .Sp If \f(CW$substring\fR does not match any part of \f(CW$string\fR, returns \f(CW\*(C`\-1\*(C'\fR in scalar context and an empty list in list context. .Sp e.g. you say .Sp .Vb 8 \& my $Collator = Unicode::Collate\->new( normalization => undef, level => 1 ); \& # (normalization => undef) is REQUIRED. \& my $str = "Ich mu\*8 studieren Perl."; \& my $sub = "MU\*:SS"; \& my $match; \& if (my($pos,$len) = $Collator\->index($str, $sub)) { \& $match = substr($str, $pos, $len); \& } .Ve .Sp and get \f(CW"mu\*8"\fR in \f(CW$match\fR since \f(CW"mu\*8"\fR is primary equal to \f(CW"MU\*:SS"\fR. .ie n .IP """$match_ref = $Collator\->match($string, $substring)""" 4 .el .IP "\f(CW$match_ref = $Collator\->match($string, $substring)\fR" 4 .IX Item "$match_ref = $Collator->match($string, $substring)" .PD 0 .ie n .IP """($match) = $Collator\->match($string, $substring)""" 4 .el .IP "\f(CW($match) = $Collator\->match($string, $substring)\fR" 4 .IX Item "($match) = $Collator->match($string, $substring)" .PD If \f(CW$substring\fR matches a part of \f(CW$string\fR, in scalar context, returns \&\fBa reference to\fR the first occurrence of the matching part (\f(CW$match_ref\fR is always true if matches, since every reference is \fBtrue\fR); in list context, returns the first occurrence of the matching part. .Sp If \f(CW$substring\fR does not match any part of \f(CW$string\fR, returns \f(CW\*(C`undef\*(C'\fR in scalar context and an empty list in list context. .Sp e.g. .Sp .Vb 5 \& if ($match_ref = $Collator\->match($str, $sub)) { # scalar context \& print "matches [$$match_ref].\en"; \& } else { \& print "doesn\*(Aqt match.\en"; \& } \& \& or \& \& if (($match) = $Collator\->match($str, $sub)) { # list context \& print "matches [$match].\en"; \& } else { \& print "doesn\*(Aqt match.\en"; \& } .Ve .ie n .IP """@match = $Collator\->gmatch($string, $substring)""" 4 .el .IP "\f(CW@match = $Collator\->gmatch($string, $substring)\fR" 4 .IX Item "@match = $Collator->gmatch($string, $substring)" If \f(CW$substring\fR matches a part of \f(CW$string\fR, returns all the matching parts (or matching count in scalar context). .Sp If \f(CW$substring\fR does not match any part of \f(CW$string\fR, returns an empty list. .ie n .IP """$count = $Collator\->subst($string, $substring, $replacement)""" 4 .el .IP "\f(CW$count = $Collator\->subst($string, $substring, $replacement)\fR" 4 .IX Item "$count = $Collator->subst($string, $substring, $replacement)" If \f(CW$substring\fR matches a part of \f(CW$string\fR, the first occurrence of the matching part is replaced by \f(CW$replacement\fR (\f(CW$string\fR is modified) and return \f(CW$count\fR (always equals to \f(CW1\fR). .Sp \&\f(CW$replacement\fR can be a \f(CW\*(C`CODEREF\*(C'\fR, taking the matching part as an argument, and returning a string to replace the matching part (a bit similar to \f(CW\*(C`s/(..)/$coderef\->($1)/e\*(C'\fR). .ie n .IP """$count = $Collator\->gsubst($string, $substring, $replacement)""" 4 .el .IP "\f(CW$count = $Collator\->gsubst($string, $substring, $replacement)\fR" 4 .IX Item "$count = $Collator->gsubst($string, $substring, $replacement)" If \f(CW$substring\fR matches a part of \f(CW$string\fR, all the occurrences of the matching part is replaced by \f(CW$replacement\fR (\f(CW$string\fR is modified) and return \f(CW$count\fR. .Sp \&\f(CW$replacement\fR can be a \f(CW\*(C`CODEREF\*(C'\fR, taking the matching part as an argument, and returning a string to replace the matching part (a bit similar to \f(CW\*(C`s/(..)/$coderef\->($1)/eg\*(C'\fR). .Sp e.g. .Sp .Vb 4 \& my $Collator = Unicode::Collate\->new( normalization => undef, level => 1 ); \& # (normalization => undef) is REQUIRED. \& my $str = "Camel donkey zebra came\ex{301}l CAMEL horse cAm\e0E\e0L..."; \& $Collator\->gsubst($str, "camel", sub { "$_[0]" }); \& \& # now $str is "Camel donkey zebra came\ex{301}l CAMEL horse cAm\e0E\e0L..."; \& # i.e., all the camels are made bold\-faced. .Ve .SS "Other Methods" .IX Subsection "Other Methods" .ie n .IP """%old_tailoring = $Collator\->change(%new_tailoring)""" 4 .el .IP "\f(CW%old_tailoring = $Collator\->change(%new_tailoring)\fR" 4 .IX Item "%old_tailoring = $Collator->change(%new_tailoring)" .PD 0 .ie n .IP """$modified_collator = $Collator\->change(%new_tailoring)""" 4 .el .IP "\f(CW$modified_collator = $Collator\->change(%new_tailoring)\fR" 4 .IX Item "$modified_collator = $Collator->change(%new_tailoring)" .PD Change the value of specified keys and returns the changed part. .Sp .Vb 1 \& $Collator = Unicode::Collate\->new(level => 4); \& \& $Collator\->eq("perl", "PERL"); # false \& \& %old = $Collator\->change(level => 2); # returns (level => 4). \& \& $Collator\->eq("perl", "PERL"); # true \& \& $Collator\->change(%old); # returns (level => 2). \& \& $Collator\->eq("perl", "PERL"); # false .Ve .Sp Not all \f(CW\*(C`(key,value)\*(C'\fRs are allowed to be changed. See also \f(CW@Unicode::Collate::ChangeOK\fR and \f(CW@Unicode::Collate::ChangeNG\fR. .Sp In the scalar context, returns the modified collator (but it is \fBnot\fR a clone from the original). .Sp .Vb 1 \& $Collator\->change(level => 2)\->eq("perl", "PERL"); # true \& \& $Collator\->eq("perl", "PERL"); # true; now max level is 2nd. \& \& $Collator\->change(level => 4)\->eq("perl", "PERL"); # false .Ve .ie n .IP """$version = $Collator\->version()""" 4 .el .IP "\f(CW$version = $Collator\->version()\fR" 4 .IX Item "$version = $Collator->version()" Returns the version number (a string) of the Unicode Standard which the \f(CW\*(C`table\*(C'\fR file used by the collator object is based on. If the table does not include a version line (starting with \f(CW@version\fR), returns \f(CW"unknown"\fR. .ie n .IP """UCA_Version()""" 4 .el .IP "\f(CWUCA_Version()\fR" 4 .IX Item "UCA_Version()" Returns the revision number of \s-1UTS\s0 #10 this module consults, that should correspond with the \s-1DUCET\s0 incorporated. .ie n .IP """Base_Unicode_Version()""" 4 .el .IP "\f(CWBase_Unicode_Version()\fR" 4 .IX Item "Base_Unicode_Version()" Returns the version number of \s-1UTS\s0 #10 this module consults, that should correspond with the \s-1DUCET\s0 incorporated. .SH "EXPORT" .IX Header "EXPORT" No method will be exported. .SH "INSTALL" .IX Header "INSTALL" Though this module can be used without any \f(CW\*(C`table\*(C'\fR file, to use this module easily, it is recommended to install a table file in the \s-1UCA\s0 format, by copying it under the directory /Unicode/Collate. .PP The most preferable one is \*(L"The Default Unicode Collation Element Table\*(R" (aka \s-1DUCET\s0), available from the Unicode Consortium's website: .PP .Vb 1 \& http://www.unicode.org/Public/UCA/ \& \& http://www.unicode.org/Public/UCA/latest/allkeys.txt (latest version) .Ve .PP If \s-1DUCET\s0 is not installed, it is recommended to copy the file from http://www.unicode.org/Public/UCA/latest/allkeys.txt to /Unicode/Collate/allkeys.txt manually. .SH "CAVEATS" .IX Header "CAVEATS" .IP "Normalization" 4 .IX Item "Normalization" Use of the \f(CW\*(C`normalization\*(C'\fR parameter requires the \fBUnicode::Normalize\fR module (see Unicode::Normalize). .Sp If you need not it (say, in the case when you need not handle any combining characters), assign \f(CW\*(C`normalization => undef\*(C'\fR explicitly. .Sp \&\-\- see 6.5 Avoiding Normalization, \s-1UTS\s0 #10. .IP "Conformance Test" 4 .IX Item "Conformance Test" The Conformance Test for the \s-1UCA\s0 is available under . .Sp For \fICollationTest_SHIFTED.txt\fR, a collator via \f(CW\*(C`Unicode::Collate\->new( )\*(C'\fR should be used; for \fICollationTest_NON_IGNORABLE.txt\fR, a collator via \&\f(CW\*(C`Unicode::Collate\->new(variable => "non\-ignorable", level => 3)\*(C'\fR. .Sp \&\fBUnicode::Normalize is required to try The Conformance Test.\fR .SH "AUTHOR, COPYRIGHT AND LICENSE" .IX Header "AUTHOR, COPYRIGHT AND LICENSE" The Unicode::Collate module for perl was written by \s-1SADAHIRO\s0 Tomoyuki, . This module is Copyright(C) 2001\-2011, \&\s-1SADAHIRO\s0 Tomoyuki. Japan. All rights reserved. .PP This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .PP The file Unicode/Collate/allkeys.txt was copied verbatim from . This file is Copyright (c) 1991\-2010 Unicode, Inc. All rights reserved. Distributed under the Terms of Use in . .SH "SEE ALSO" .IX Header "SEE ALSO" .IP "Unicode Collation Algorithm \- \s-1UTS\s0 #10" 4 .IX Item "Unicode Collation Algorithm - UTS #10" .IP "The Default Unicode Collation Element Table (\s-1DUCET\s0)" 4 .IX Item "The Default Unicode Collation Element Table (DUCET)" .IP "The conformance test for the \s-1UCA\s0" 4 .IX Item "The conformance test for the UCA" .Sp .IP "Hangul Syllable Type" 4 .IX Item "Hangul Syllable Type" .IP "Unicode Normalization Forms \- \s-1UAX\s0 #15" 4 .IX Item "Unicode Normalization Forms - UAX #15" .IP "Unicode Locale Data Markup Language (\s-1LDML\s0) \- \s-1UTS\s0 #35" 4 .IX Item "Unicode Locale Data Markup Language (LDML) - UTS #35"