diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/install_steps.pm | 1 | ||||
-rw-r--r-- | perl-install/lang.pm | 9 |
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}); |