summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Saratxaga <pablo@mandriva.com>2002-12-05 13:38:14 +0000
committerPablo Saratxaga <pablo@mandriva.com>2002-12-05 13:38:14 +0000
commit50dda33228ca3131595b8c86ec8f1a60a49a61dc (patch)
tree5f40da73944bfdb857f0c227715176f884dec9ec
parentd1edcf705a0386524862f26721e1d1e1c3883032 (diff)
downloaddrakx-50dda33228ca3131595b8c86ec8f1a60a49a61dc.tar
drakx-50dda33228ca3131595b8c86ec8f1a60a49a61dc.tar.gz
drakx-50dda33228ca3131595b8c86ec8f1a60a49a61dc.tar.bz2
drakx-50dda33228ca3131595b8c86ec8f1a60a49a61dc.tar.xz
drakx-50dda33228ca3131595b8c86ec8f1a60a49a61dc.zip
Changed the way locale->encoding is handled; revert to the old way which was
working. And changed the charset to use during install to UTF-8 for all but CJK locales, in the X11 locale config files and in lang.pm; So, the same values of LC_* variables are used as before; but they should point, in glibc and in X11, to UTF-8 locales now
-rw-r--r--perl-install/lang.pm41
-rwxr-xr-xperl-install/share/gen_locales.sh23
-rw-r--r--perl-install/share/locales-skeleton.tar.bz2bin1347 -> 1777 bytes
3 files changed, 23 insertions, 41 deletions
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 738bcb35c..210ea63ef 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -75,15 +75,15 @@ my %languages = my @languages = (
'he_IL.UTF-8' => [ 'Hebrew', 'iso-8859-8', 'he', 'he:iw_IL', 'UTF-8' ],
'hr' => [ 'Croatian', 'iso-8859-2', 'hr', 'hr' ],
'hu' => [ 'Hungarian', 'iso-8859-2', 'hu', 'hu' ],
-#'hy_AM.ARMSCII-8'=> [ 'Armenian|ARMSCII-8','armscii-8','hy','hy' ],
-'hy_AM.UTF-8' => [ 'Armenian', 'armscii-8', 'hy', 'hy', 'UTF-8' ],
+#'hy_AM.ARMSCII-8'=> [ 'Armenian|ARMSCII-8','utf_hy','hy','hy' ],
+'hy_AM.UTF-8' => [ 'Armenian', 'utf_hy', 'hy', 'hy', 'UTF-8' ],
#- 'in' was the old code for indonesian language; by putting LANGUAGE=id:in_ID
#- we catch the few catalog files still using the wrong code
'id' => [ 'Indonesian', 'iso-8859-1', 'id', 'id:in_ID' ],
'is' => [ 'Icelandic', 'iso-8859-1', 'is', 'is' ],
'it_CH' => [ 'Italian|Switzerland', 'iso-8859-15', 'it', 'it_IT:it' ],
'it_IT' => [ 'Italian|Italy', 'iso-8859-15', 'it', 'it_IT:it' ],
-#-'iu' => [ 'Inuktitut', 'unicodeIU', 'iu', 'iu' ],
+#-'iu' => [ 'Inuktitut', 'utf_iu', 'iu', 'iu' ],
'ja' => [ 'Japanese', 'jisx0208', 'ja', 'ja_JP.ujis:ja' ],
'ja_JP.UTF-8' => [ 'Japanese (UTF-8)', 'jisx0208', 'ja', 'ja_JP.ujis:ja', 'UTF-8' ],
'ka_GE.UTF-8' => [ 'Georgian', 'utf_ka', 'ka', 'ka', 'UTF-8' ],
@@ -91,7 +91,7 @@ my %languages = my @languages = (
'ko' => [ 'Korean', 'ksc5601', 'ko', 'ko' ],
'ko_KR.UTF-8' => [ 'Korean (UTF-8)', 'ksc5601', 'ko', 'ko', 'UTF-8' ],
#-'kw' => [ 'Cornish gaelic', 'iso-8859-14','kw', 'kw:en_GB:en' ],
-#-'lo' => [ 'Laotian', 'mulelao-1', 'lo', 'lo' ],
+#-'lo' => [ 'Laotian', 'utf_lo', 'lo', 'lo' ],
'lt' => [ 'Lithuanian', 'iso-8859-13', 'lt', 'lt' ],
'lv' => [ 'Latvian', 'iso-8859-13', 'lv', 'lv' ],
'mi' => [ 'Maori', 'iso-8859-13', 'mi', 'mi' ],
@@ -137,15 +137,15 @@ my %languages = my @languages = (
'th' => [ 'Thai|TIS-620', 'tis620', 'th', 'th' ],
'th_TH.UTF-8' => [ 'Thai (UTF-8)', 'tis620', 'th', 'th', 'UTF-8' ],
'tr' => [ 'Turkish', 'iso-8859-9', 'tr', 'tr' ],
-#-'tt_RU.UTF-8' => [ 'Tatar', 'koi8-k', 'tt', 'tt' ],
+#-'tt_RU.UTF-8' => [ 'Tatar', 'utf_koi8-k', 'tt', 'tt' ],
#-'ur' => [ 'Urdu', 'cp1256', 'ur', 'ur' ],
'uk_UA' => [ 'Ukrainian|KOI8-U', 'koi8-u', 'uk', 'uk_UA:uk' ],
'uk_UA.CP1251' => [ 'Ukrainian|CP1251', 'cp1251', 'uk', 'uk_UA:uk' ],
'uk_UA.UTF-8' => [ 'Ukrainian|UTF-8', 'cp1251', 'uk', 'uk_UA:uk', 'UTF-8' ],
'uz' => [ 'Uzbek', 'iso-8859-1', 'uz', 'uz' ],
-#'vi_VN.TCVN' => [ 'Vietnamese|TCVN', 'tcvn', 'vi', 'vi' ],
-#'vi_VN.VISCII' => [ 'Vietnamese|VISCII','viscii', 'vi', 'vi' ],
-'vi_VN.UTF-8' => [ 'Vietnamese', 'viscii', 'vi', 'vi', 'UTF-8' ],
+#'vi_VN.TCVN' => [ 'Vietnamese|TCVN', 'utf_vi', 'vi', 'vi' ],
+#'vi_VN.VISCII' => [ 'Vietnamese|VISCII','utf_vi', 'vi', 'vi' ],
+'vi_VN.UTF-8' => [ 'Vietnamese', 'utf_vi', 'vi', 'vi', 'UTF-8' ],
'wa' => [ 'Walon', 'iso-8859-15', 'wa', 'wa:fr_BE:fr' ],
#-'yi' => [ 'Yiddish', 'cp1255', 'yi', 'yi' ],
#- NOTE: 'zh' must be in the LANGUAGE list, it is not used for translations
@@ -256,7 +256,7 @@ sub std { std2($_[0], $_[1] || 10), std2($_[0], 8) }
#- [4]: codepage parameter for mount (none if utf8)
#- [5]: X11 fontset (for DrakX)
my %charsets = (
- "armscii-8" => [ "arm8", undef, "armscii-8",
+ "utf_hy" => [ "arm8", undef, "armscii-8",
undef, undef, std_("armscii-8") ],
#- chinese needs special console driver for text mode
"Big5" => [ undef, undef, undef,
@@ -325,7 +325,7 @@ my %charsets = (
"tis-620", "874", std2("tis620.2533-1",12) ],
#- "tcvn" => [ "tcvn8x16", undef, "tcvn",
#- undef, undef, std2("tcvn-5712", 13), std2("tcvn-5712", 10) ],
- "viscii" => [ "tcvn8x16", undef, "viscii",
+ "utf_vi" => [ "tcvn8x16", undef, "viscii",
undef, undef, std2("tcvn-5712", 13), std2("tcvn-5712", 10) ],
#- Tamil uses pseudo iso-8859-1 fonts
"tscii" => [ "tamil", undef, "tscii-0",
@@ -375,7 +375,7 @@ my %lang2country = (
);
-my @during_install__lang_having_their_LC_CTYPE = qw(ja ko th vi);
+my @during_install__lang_having_their_LC_CTYPE = qw(ja ko ta);
#-######################################################################################
#- Functions
@@ -520,13 +520,13 @@ my %charset2kde_font = (
'gb2312' => [ "default-ming,16" ],
'Big5' => [ "taipei-fixed,16" ],
'tis620' => [ "misc-norasi,17", ],
- 'viscii' => [ "misc-fixed,13", "misc-fixed,13", "misc-fixed,10", ],
+ 'utf_vi' => [ "misc-fixed,13", "misc-fixed,13", "misc-fixed,10", ],
#- TSCII uses pseudo iso-8859-1 fonts, it is important to choose them
#- correctly
'tscii' => [ "tsc_avarangal,14", "tsc_avarangalfxd,10", "tsc_avarangal,12", ],
#- the following should be changed to better defaults when better fonts
#- get available
- 'armscii-8' => [ "clearlyu,17" ],
+ 'utf_hy' => [ "clearlyu,17" ],
'utf_ka' => [ "clearlyu,17" ],
'default' => [ "misc-fixed,13", "misc-fixed,13", "misc-fixed,10", ],
);
@@ -589,15 +589,15 @@ sub set {
#- set all LC_* variables to a unique locale ("C"), and only redefine
#- LC_CTYPE (for X11 choosing the fontset) and LANGUAGE (for the po files)
- $ENV{$_} = 'en_US.UTF-8' foreach qw(LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION);
+ $ENV{$_} = 'C' foreach qw(LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION);
#- use lang2LANG() to define LC_CTYPE, so DrakX will use a same encoding
#- for all variations of a same language, eg both 'ru_RU.KOI8-R' and
#- 'ru_RU.UTF-8' will be handled the same (as 'ru') by DrakX.
#- that way DrakX only needs a reduced set of locale and fonts support.
#- of course on the installed system they will be different.
- $ENV{LC_CTYPE} = 'en_US.UTF-8';
- $ENV{LC_MESSAGES} = 'en_US.UTF-8';
+ $ENV{LC_CTYPE} = lang2LANG($lang);
+ $ENV{LC_MESSAGES} = lang2LANG($lang);
$ENV{LANG} = lang2LANG($lang);
if ($translate_for_console && $lang =~ /^(ko|ja|zh|th)/) {
@@ -833,10 +833,11 @@ sub during_install__lang2charset {
return if member(lang2LANG($lang), @during_install__lang_having_their_LC_CTYPE);
my ($c) = lang2charset($lang) or die "bad lang $lang\n";
- $c = 'cp1251' if $c =~ /koi8-/;
- $c = 'iso-8859-15' if member($c, 'iso-8859-1', 'C');
- $c = 'UTF-8' if member($c, 'unicode', 'utf_ka');
- $c = 'UTF-8' if member($c, 'armscii-8', 'iso-8859-9e', 'iso-8859-8', 'iso-8859-6'); #- BAD, need fixing
+ $c = 'UTF-8' if member($c, 'tis620', 'C');
+ $c = 'UTF-8' if $c =~ /koi8-/;
+ $c = 'UTF-8' if $c =~ /iso-8859/;
+ $c = 'UTF-8' if $c =~ /cp125/;
+ $c = 'UTF-8' if $c =~ /utf_/;
uc($c);
}
diff --git a/perl-install/share/gen_locales.sh b/perl-install/share/gen_locales.sh
index b3f6b3c5d..652b82dd5 100755
--- a/perl-install/share/gen_locales.sh
+++ b/perl-install/share/gen_locales.sh
@@ -8,28 +8,9 @@ for i in LC_ADDRESS LC_COLLATE LC_CTYPE LC_IDENTIFICATION LC_MEASUREMENT LC_MONE
install -D -m 644 /usr/share/locale/UTF-8/$i usr/share/locale/UTF-8/$i
done
-# lc_ctype for common encoding
-for i in CP1251 ISO-8859-13 ISO-8859-14 ISO-8859-15 ISO-8859-2 ISO-8859-3 ISO-8859-7 ISO-8859-9 ISO-8859-9E ; do
- f=usr/share/locale/$i/LC_CTYPE
- [ -e /$f ] || { echo missing /$f ; exit 1 ; }
- install -D -m 644 /$f $f
- (cd usr/share/locale/$i ; ln -s ../UTF-8/* . 2>/dev/null)
-done
-
-# for non common encodings, build them locally to ensure they are present
-for i in ISO-8859-9E ARMSCII-8 GEORGIAN-ACADEMY KOI8-K TCVN-5712
-do
- /usr/bin/localedef -c -i en_US -f $i ./$i
-
- f=usr/share/locale/$i/LC_CTYPE
- [ -e ./$i/LC_CTYPE ] || { echo missing ./$i/LC_CTYPE ; exit 1 ; }
- install -D -m 644 ./$i/LC_CTYPE $f
- (cd usr/share/locale/$i ; ln -s ../UTF-8/* . 2>/dev/null)
-done
-
# lc_ctype for non common encodings
rm -rf .tmp2 ; mkdir .tmp2 ; cd .tmp2
-for i in ja ko ta th ; do
+for i in ja ko ; do
ii=locales-`echo $i | sed 's/\(..\).*/\1/'`
rpm2cpio /RPMS/$ii-*.rpm | cpio -id --quiet
f=usr/share/locale/$i/LC_CTYPE
@@ -59,7 +40,7 @@ cd .. ; rm -rf .tmp2
perl -I../.. ../gen_locales.pl || exit 1
-for i in common C armscii-8 en_US.UTF-8 georgian-ps iso8859-1 iso8859-13 iso8859-14 iso8859-15 iso8859-2 iso8859-3 iso8859-5 iso8859-7 iso8859-9 iso8859-9e ja ko koi8-r koi8-u koi8-k microsoft-cp1251 microsoft-cp1255 microsoft-cp1256 th_TH tscii-0 vi_VN.tcvn zh_CN zh_TW.big5 ; do
+for i in common C en_US.UTF-8 iso8859-1 ja ko tscii-0 zh_CN zh_TW.big5 ; do
cp -a /usr/X11R6/lib/X11/locale/$i usr/X11R6/lib/X11/locale
done
diff --git a/perl-install/share/locales-skeleton.tar.bz2 b/perl-install/share/locales-skeleton.tar.bz2
index 104990d03..0bf8c6ad2 100644
--- a/perl-install/share/locales-skeleton.tar.bz2
+++ b/perl-install/share/locales-skeleton.tar.bz2
Binary files differ