From: Audrey Tang Date: Wed, 6 Apr 2005 18:17:32 +0000 (+0800) Subject: Re: Bugs? In Unicode::EastAsianWidth. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=adc6a8bda4a952a87bcbd5de609cab61c47a2b49;p=p5sagit%2Fp5-mst-13.2.git Re: Bugs? In Unicode::EastAsianWidth. Message-ID: <20050406101732.GA17931@aut.dyndns.org> p4raw-id: //depot/perl@24191 --- diff --git a/lib/unicore/mktables b/lib/unicore/mktables index c3320ed..e5480ca 100644 --- a/lib/unicore/mktables +++ b/lib/unicore/mktables @@ -1242,14 +1242,18 @@ sub EastAsianWidth_txt() while () { - 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;