From: Jarkko Hietaniemi Date: Tue, 3 Jul 2001 19:45:30 +0000 (+0000) Subject: Unicode::UCD updates. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=32c1605034c0e8c0f82165b586c06d425aaacfd4;p=p5sagit%2Fp5-mst-13.2.git Unicode::UCD updates. p4raw-id: //depot/perl@11126 --- diff --git a/lib/Unicode/UCD.pm b/lib/Unicode/UCD.pm index 449229a..49e80f3 100644 --- a/lib/Unicode/UCD.pm +++ b/lib/Unicode/UCD.pm @@ -44,12 +44,7 @@ sub openunicode { for my $d (@INC) { use File::Spec; $f = File::Spec->catfile($d, "unicode", @path); - next unless -f $f; - if (open($$rfh, $f)) { - last; - } else { - croak __PACKAGE__, ": open '$f' failed: $!\n"; - } + last if open($$rfh, $f); } croak __PACKAGE__, ": failed to find ",join("/",@path)," in @INC\n" unless defined $rfh; @@ -87,9 +82,16 @@ by the Unicode standard: If no match is found, an empty hash is returned. -The C property is the same as as returned by charinfo(). -(It is not defined in the Unicode Character Database proper but -instead in an auxiliary database.) +The C property is the same as as returned by charinfo(). It is +not defined in the Unicode Character Database proper (Chapter 4 of the +Unicode 3.0 Standard) but instead in an auxiliary database (Chapter 14 +of TUS3). + +Note that you cannot do (de)composition and casing based solely on the +above C and C, C, C, properties, +you will need also the I<Composition Exclusions> and I<SpecialCasing> +tables, available as files F<CompExcl.txt> and F<SpecCase.txt> in the +Perl distribution. =cut @@ -175,6 +177,11 @@ sub charblock { _charblock($code, 0, $#BLOCKS); } +=head1 NOTE + +The first use of L<charinfo> opens a read-only filehandle to the Unicode +Character Database. The filehandle is kept open for further queries. + =head1 AUTHOR Jarkko Hietaniemi