summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-03-10 13:59:30 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-03-10 13:59:30 +0000
commit77278a698e503fb739989843801f7b70a64630d2 (patch)
tree59a4b470a702510cf99cd3cd252d3b16567532f8
parentc8dcff773a3a536db1561689000b4d973d988af4 (diff)
downloaddrakx-backup-do-not-use-77278a698e503fb739989843801f7b70a64630d2.tar
drakx-backup-do-not-use-77278a698e503fb739989843801f7b70a64630d2.tar.gz
drakx-backup-do-not-use-77278a698e503fb739989843801f7b70a64630d2.tar.bz2
drakx-backup-do-not-use-77278a698e503fb739989843801f7b70a64630d2.tar.xz
drakx-backup-do-not-use-77278a698e503fb739989843801f7b70a64630d2.zip
fix original #2842 problem
-rw-r--r--perl-install/install_steps.pm1
-rw-r--r--perl-install/lang.pm9
2 files changed, 8 insertions, 2 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 7ea14705a..5cbbdad17 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -99,6 +99,7 @@ sub selectLanguage {
$o->{locale}{country} = $1;
}
+ lang::langs_selected($o->{locale});
log::l("selectLanguage: pack_langs ", lang::pack_langs($o->{locale}{langs}));
#- for auto_install compatibility with old $o->{keyboard} containing directly $o->{keyboard}{KEYBOARD}
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 858d61640..e51e45fba 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -806,6 +806,13 @@ sub langsLANGUAGE {
uniq(map { split ':', getLANGUAGE($_, $c) } langs($l));
}
+sub langs_selected {
+ my ($locale) = @_;
+ #- adding the UTF-8 flag (if not forced) depends on the selected languages
+ $locale->{utf8} ||= l2charset($locale->{lang}) =~ /utf|unicode/
+ || (uniq map { l2charset($_) } langs($locale->{langs})) > 1;
+}
+
sub pack_langs {
my ($l) = @_;
my $s = $l->{all} ? 'all' : join ':', uniq(map { getLANGUAGE($_) } langs($l));
@@ -849,8 +856,6 @@ sub write {
$locale && $locale->{lang} or return;
- $locale->{utf8} ||= l2charset($locale->{lang}) =~ /utf|unicode/
- || (uniq map { l2charset($_) } langs($locale->{langs})) > 1;
my $locale_lang = getlocale_for_lang($locale->{lang}, $locale->{country}, $locale->{utf8});
my $locale_country = getlocale_for_country($locale->{lang}, $locale->{country}, $locale->{utf8});