summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-03-30 15:20:49 +0000
committerThierry Vignaud <tv@mandriva.org>2009-03-30 15:20:49 +0000
commita1202d4614c0c7187950e9d15da9113ebc7f235b (patch)
treeea435026c2fa33c299033682d2533e1fc72015fc
parent504f9e9afc029ed399d7878c8757782fbed29c51 (diff)
downloaddrakx-a1202d4614c0c7187950e9d15da9113ebc7f235b.tar
drakx-a1202d4614c0c7187950e9d15da9113ebc7f235b.tar.gz
drakx-a1202d4614c0c7187950e9d15da9113ebc7f235b.tar.bz2
drakx-a1202d4614c0c7187950e9d15da9113ebc7f235b.tar.xz
drakx-a1202d4614c0c7187950e9d15da9113ebc7f235b.zip
(ask_user_and_root) in order to guess the login name, just transliterate
the real name into ascii rather than truncate it on first non ascii character
-rw-r--r--perl-install/any.pm3
-rw-r--r--perl-install/install/NEWS3
2 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 8a547e0d4..edcb64f77 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -816,7 +816,8 @@ sub ask_user_and_root {
alignment => 'right', format => \&translate },
),
{ label => N("Real name"), val => \$u->{realname}, alignment => 'right', focus_out => sub {
- $u->{name} ||= lc first($u->{realname} =~ /([a-zA-Z0-9_-]+)/);
+ $u->{name} ||= Locale::gettext::iconv($u->{realname}, "utf-8", "ascii//TRANSLIT");
+ $u->{name} =~ s/[^a-zA-Z0-9_-]//g; # drop any charcter that would break login program
} },
{ label => N("Login name"), val => \$u->{name}, list => \@suggested_names, alignment => 'right',
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 8e7cd7117..e36571c9c 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,6 @@
+- in order to guess the login name, just transliterate the real name into
+ ascii rather than truncate it on first non ascii characte-
+
Version 12.20 - 30 March 2009
- media management: