From fc992d38b46445e76b0151b1aa939e2359e355d6 Mon Sep 17 00:00:00 2001 From: Chris Little Date: Mon, 28 Jun 2010 23:00:44 +0000 Subject: updated some locale data files git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@282 07627401-56e2-0310-80f4-f8cd0041bdcd --- locales/makeCodeList.pl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'locales/makeCodeList.pl') 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>) -- cgit