package Chise_utils;
-require 5.005;
+require 5.008;
use strict;
use warnings;
our @EXPORT = qw(
);
-our $VERSION = '0.01';
+our $VERSION = '0.02';
# Preloaded methods go here.
sub get_char_attribute{
my($char,$atr)=@_;
+ my($res);
&get_db($atr) or return "";
- if($chardb{$atr}->{"?$char"}){
- return $chardb{$atr}->{"?$char"};
+ if($res=$chardb{$atr}->{"?$char"}){
+ utf8::decode($res);
+ return $res;
}else{
return "";
}
if(&get_db($atr)){
foreach $char (keys %{$chardb{$atr}}){
if($chardb{$atr}->{$char}=~/$value/){
+ utf8::decode($char);
$char=~s/^\?//;
push @res,$char;
}
if(defined($reverse_db{$atr})){
if(&get_reverse_db($atr)){
if($char=$reverse_chardb{$atr}->{$value}){
+ utf8::decode($char);
$char=~s/^\?//;
push @res,$char;
}
if(&get_db($atr)){
foreach $char (keys %{$chardb{$atr}}){
if($chardb{$atr}->{$char} eq $value){
+ utf8::decode($char);
$char=~s/^\?//;
push @res,$char;
}