Changeset View
Changeset View
Standalone View
Standalone View
head/tools/tools/locale/tools/cldr2def.pl
Show First 20 Lines • Show All 454 Lines • ▼ Show 20 Lines | foreach my $c (sort keys(%{$languages{$l}{$f}{data}})) { | ||||
$languages{$l}{$f}{data}{$c}{$DEFENCODING} = $shex; | $languages{$l}{$f}{data}{$c}{$DEFENCODING} = $shex; | ||||
$hashtable{$shex}{"${l}_${f}_${c}.$DEFENCODING"} = 1; | $hashtable{$shex}{"${l}_${f}_${c}.$DEFENCODING"} = 1; | ||||
open(FOUT, ">$TYPE.draft/$actfile.$DEFENCODING.src"); | open(FOUT, ">$TYPE.draft/$actfile.$DEFENCODING.src"); | ||||
print FOUT @lines; | print FOUT @lines; | ||||
close(FOUT); | close(FOUT); | ||||
foreach my $enc (sort keys(%{$languages{$l}{$f}{data}{$c}})) { | foreach my $enc (sort keys(%{$languages{$l}{$f}{data}{$c}})) { | ||||
next if ($enc eq $DEFENCODING); | next if ($enc eq $DEFENCODING); | ||||
$filename = "$UNIDIR/posix/$file.$DEFENCODING.src"; | $filename = "$UNIDIR/posix/$file.$DEFENCODING.src"; | ||||
if ($file eq 'ja_JP') { | |||||
# Override $filename for ja_JP because | |||||
# its CTYPE is not compatible with UTF-8. | |||||
$filename = "$UNIDIR/posix/$file.eucJP.src"; | |||||
} | |||||
if (! -f $filename) { | if (! -f $filename) { | ||||
print STDERR "Cannot open $filename\n"; | print STDERR "Cannot open $filename\n"; | ||||
next; | next; | ||||
} | } | ||||
@lines = (); | @lines = (); | ||||
open(FIN, "$filename"); | open(FIN, "$filename"); | ||||
while (<FIN>) { | while (<FIN>) { | ||||
if ((/^comment_char\s/) || (/^escape_char\s/)){ | if ((/^comment_char\s/) || (/^escape_char\s/)){ | ||||
▲ Show 20 Lines • Show All 574 Lines • Show Last 20 Lines |