$texmacro[0x1E5D]='{\ifmmode \ucirc{\bar{r}}\else \ucirc{\={r}}\fi}';
}
-$idsdata_file="$omegadb_path/idsdata.pl";
+$idsdata_file="$omegadb_path/idsdata.txt";
$ids_start=0x00;
$font_start=0;
if(-e $idsdata_file){
- open(IDSDATA,"+<$idsdata_file") or die;
+ open(IDSDATA,"+<:utf8",$idsdata_file) or die;
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,">$idsdata_file") or die;
+ open(IDSDATA,">:utf8",$idsdata_file) or die;
flock(IDSDATA,LOCK_EX);
seek(IDSDATA,0,0);
}
}
}
-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);
if($exec_makefonts){
##############
# Read ids data generated by inCHISE
-my $idsdata="$omegadb_path/idsdata.pl";
+my $idsdata="$omegadb_path/idsdata.txt";
my ($font_start, $ids_start, %ids);
if(-e $idsdata){
# "require" doesn't work well.
# I don't know why...
open (my $data, "<:utf8","$idsdata");
while(<$data>){
- 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,];
+ }
}
close($data);
}else{