use utf8;
use BerkeleyDB;
use vars qw(%db %chardb $atr
+ $idc
);
our @ISA = qw(Exporter);
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
# will save memory.
our %EXPORT_TAGS = ( 'all' => [ qw(
- %db %chardb
+ %db %chardb $idc
&get_char_attribute
&get_chars_matching
&get_chars_containing
&get_chars_matching
&get_chars_for
&de_er
+ &ids_argc
) ] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
exit 1;
}
+$idc="[⿰-⿻]";
+
for (<$DB_HOME/*>){
next if(/\.txt$/);
$atr=$_;
if($chardb{$atr}->{"?$char"}){
return $chardb{$atr}->{"?$char"};
}else{
- return "no attribute for $char";
+ return "";
}
}
if(defined(%{$chardb{$atr}})){
foreach $char (keys %{$chardb{$atr}}){
if($chardb{$atr}->{$char}=~/$value/){
+ $char=~s/^\?//;
push @res,$char;
}
}
my($char,@res);
if(defined(%{$chardb{$atr}})){
foreach $char (keys %{$chardb{$atr}}){
- if($chardb{$atr}->{$char}=~/^$value$/){
+ if($chardb{$atr}->{$char} eq $value){
+ $char=~s/^\?//;
push @res,$char;
}
}
return $char;
}
+sub ids_argc{
+ my($char)=@_;
+ my $char_id=unpack("U",$char);
+ if($char_id==0x2ff2 or $char_id==0x2ff3){
+ return 3;
+ }elsif($char_id>=0x2ff0 and $char_id<=0x2fff){
+ return 2;
+ }else{
+ return 0;
+ }
+}
+
# Autoload methods go after =cut, and are processed by the autosplit program.
1;