sub DESTROY {}
-sub croak { require Carp; Carp::croak(@_) }
-
my %Cache;
+sub croak { require Carp; Carp::croak(@_) }
+
##
## "SWASH" == "SWATCH HASH". A "swatch" is a swatch of the Unicode landscape
##
print STDERR "$1 => $2\n" if DEBUG;
if ($char =~ /[-+!]/) {
my ($c,$t) = split(/::/, $name, 2); # bogus use of ::, really
- my $subobj = $c->SWASHNEW($t, "", 0, 0, 0);
+ my $subobj;
+ if ($c eq 'utf8') {
+ $subobj = $c->SWASHNEW($t, "", 0, 0, 0);
+ }
+ elsif ($c =~ /^([0-9a-fA-F]+)/) {
+ $subobj = utf8->SWASHNEW("", $c, 0, 0, 0);
+ }
return $subobj unless ref $subobj;
push @extras, $name => $subobj;
$bits = $subobj->{BITS} if $bits < $subobj->{BITS};
}
else {
LINE:
- while (/^([0-9a-fA-F]+)(?:\t([0-9a-fA-F]+))?/mg) {
+ while (/^([0-9a-fA-F]+)(?:[ \t]+([0-9a-fA-F]+))?/mg) {
my $min = hex $1;
my $max = (defined $2 ? hex $2 : $min);
next if $max < $start;