diff options
author | Chris Little <chrislit@crosswire.org> | 2010-06-28 23:00:44 +0000 |
---|---|---|
committer | Chris Little <chrislit@crosswire.org> | 2010-06-28 23:00:44 +0000 |
commit | fc992d38b46445e76b0151b1aa939e2359e355d6 (patch) | |
tree | 35bda60423465b37042bee7db3d662da26e9d684 /locales/makeCodeList.pl | |
parent | 53046e22147f5b8186e509fc3c4c8214ef3f1d51 (diff) | |
download | sword-tools-fc992d38b46445e76b0151b1aa939e2359e355d6.tar.gz |
updated some locale data files
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@282 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'locales/makeCodeList.pl')
-rw-r--r-- | locales/makeCodeList.pl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/locales/makeCodeList.pl b/locales/makeCodeList.pl index f02751e..4f037c4 100644 --- a/locales/makeCodeList.pl +++ b/locales/makeCodeList.pl @@ -20,11 +20,13 @@ use strict;
use Unicode::Normalize;
binmode(STDOUT, ":utf8");
+print "[locales]\n";
-my $nameIndex = "iso-639-3_Name_Index_20090210.tab";
-my $langCodes = "iso-639-3_20090210.tab";
-my $deadCodes = "iso-639-3_Retirements_20090126.tab";
+my $nameIndex = "iso-639-3_Name_Index.tab";
+my $langCodes = "iso-639-3.tab";
+my $deadCodes = "iso-639-3_Retirements.tab";
my %names = ();
+
open(my $nameIndexFile, "<:utf8", $nameIndex);
# skip the first line
my $firstLine = <$nameIndexFile>;
@@ -54,15 +56,14 @@ while (<$langFile>) # ensure it is normalized to NFC
$_ = NFC($_);
my @line = split(/\t/o, $_);
- # exclude extinct languages
- next if ($line[5] eq 'E');
+# # exclude extinct languages
+# next if ($line[5] eq 'E');
my $name = $names{$line[0],$line[6]};
print "$line[3]=$name\n" if ($line[3]);
print "$line[0]=$name\n";
}
-# The dead codes file is iso-8859-1. This may change at some date.
-open(my $deadFile, "<:encoding(iso-8859-1)", $deadCodes);
+open(my $deadFile, "<:utf8", $deadCodes);
# skip the first line
$firstLine = <$deadFile>;
while (<$deadFile>)
|