}
}
else{
-# # fall back if DB inconsistency exists.
+# never fall back.
# unless(@res){
+# # fall back if DB inconsistency exists.
if(&get_db($atr)){
foreach $char (keys %{$chardb{$atr}}){
if($chardb{$atr}->{$char} eq $value){
}
}
}
- foreach (keys %res){
- if($res{$_}==$i){
- push @res,$_;
- }
- }
- return @res;
+ return grep {defined($res{$_}) and $res{$_}==$i} (keys %res);
}
sub de_er{
my($er)=@_;
my($output_char,$atr,$value);
if($er=~/^\d+$/){
+ # only for debug.
$output_char=pack("U",$er);
}elsif($er=~/^U[\+\-]([a-fA-F\d]+)/){
$output_char=pack("U",hex($1));