diff options
Diffstat (limited to 'lib/Unicode/Collate.pm')
-rw-r--r-- | lib/Unicode/Collate.pm | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/Unicode/Collate.pm b/lib/Unicode/Collate.pm index 8522a79f2c..43446162a9 100644 --- a/lib/Unicode/Collate.pm +++ b/lib/Unicode/Collate.pm @@ -137,24 +137,26 @@ sub parseEntry # get element my($e, $k) = split /;/, $line; my @e = _getHexArray($e); - $ele = pack('U*', @e); + { no warnings 'utf8'; $ele = pack('U*', @e); } return if defined $self->{undefChar} && $ele =~ /$self->{undefChar}/; # get sort key - if( + { no warnings 'utf8'; + if( defined $self->{ignoreName} && $name =~ /$self->{ignoreName}/ || defined $self->{ignoreChar} && $ele =~ /$self->{ignoreChar}/ - ) - { - $self->{entries}{$ele} = $self->{ignored}{$ele} = 1; - } - else - { - foreach my $arr ($k =~ /\[(\S+)\]/g) { - my $var = $arr =~ /\*/; - push @key, $self->altCE( $var, _getHexArray($arr) ); + ) + { + $self->{entries}{$ele} = $self->{ignored}{$ele} = 1; + } + else + { + foreach my $arr ($k =~ /\[(\S+)\]/g) { + my $var = $arr =~ /\*/; + push @key, $self->altCE( $var, _getHexArray($arr) ); + } + $self->{entries}{$ele} = \@key; } - $self->{entries}{$ele} = \@key; } $self->{maxlength}{ord $ele} = scalar @e if @e > 1; } |