summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAudrey Tang <cpan@audreyt.org>2005-04-07 02:17:32 +0800
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-04-07 09:45:27 +0000
commitadc6a8bda4a952a87bcbd5de609cab61c47a2b49 (patch)
treedf6f51d3ad04ca1d14c8073c12832ddc545bedc6 /lib
parent2e8f3c35926871095feda1ba18dbe8ffc40a0273 (diff)
downloadperl-adc6a8bda4a952a87bcbd5de609cab61c47a2b49.tar.gz
Re: Bugs? In Unicode::EastAsianWidth.
Message-ID: <20050406101732.GA17931@aut.dyndns.org> p4raw-id: //depot/perl@24191
Diffstat (limited to 'lib')
-rw-r--r--lib/unicore/mktables12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/unicore/mktables b/lib/unicore/mktables
index c3320ed3b4..e5480ca2e9 100644
--- a/lib/unicore/mktables
+++ b/lib/unicore/mktables
@@ -1242,14 +1242,18 @@ sub EastAsianWidth_txt()
while (<IN>)
{
- next unless /^[0-9A-Fa-f]+;/;
+ next unless /^[0-9A-Fa-f]+(\.\.[0-9A-Fa-f]+)?;/;
s/#.*//;
s/\s+$//;
- my ($hexcode, $pv) = split(/\s*;\s*/);
- my $code = hex($hexcode);
+ my ($hexcodes, $pv) = split(/\s*;\s*/);
$EAW{$pv} ||= Table->New(Is => "EastAsianWidth$pv");
- $EAW{$pv}->Append($code);
+ my ($start, $end) = split(/\.\./, $hexcodes);
+ if (defined $end) {
+ $EAW{$pv}->AppendRange(hex($start), hex($end));
+ } else {
+ $EAW{$pv}->Append(hex($start));
+ }
}
close IN;