### End ###
-$/="";
-
my $strictly_forbidden_after = '「【『[(〈‘‛“‟(〔{《{\[\(〖{「';
my $forbidden_after = "\x{0000}";
$omegadb_path=~s!/$!!;
-$idsdata_file="$omegadb_path/idsdata.pl";
+$idsdata_file="$omegadb_path/idsdata.txt";
$ids_start=0x00;
$font_start=0;
flock(IDSDATA,LOCK_EX);
seek(IDSDATA,0,0);
while(<IDSDATA>){
- eval $_;
+ utf8::decode($_);
+ if(m/^START\t(\d+)\t(\d+)/){
+ $font_start=$1,$ids_start=$2;
+ }elsif(m/^(.*?)\t(\d+)\t(\d+)/){
+ $ids{$1}=[$2,$3,];
+ }
}
seek(IDSDATA,0,0);
-# require $idsdata_file;
+ truncate(IDSDATA,0);
}else{
open(IDSDATA,">:utf8",$idsdata_file) or die;
flock(IDSDATA,LOCK_EX);
}
}
+$/="";
+
while(<>){
utf8::decode($_);
print '}';
}
-print IDSDATA 'use utf8;',"\n";
+print IDSDATA 'START',"\t",$font_start,"\t",$ids_start,"\n";
foreach $ids (keys %ids){
- print IDSDATA '$ids{\'',$ids,'\'}='
- ,'[',join ",",@{$ids{$ids}},"];\n";
+ print IDSDATA $ids,"\t",join("\t",@{$ids{$ids}}),"\n";
}
-print IDSDATA '$font_start=',$font_start,";\n";
-print IDSDATA '$ids_start=',$ids_start,";\n";
-print IDSDATA "1;";
flock(IDSDATA,LOCK_UN);
exit 0;