Package: adduser
Version: 3.112+nmu1
Tags: l10n, patch
Severity: normal
Hello.
Here patch, which resolved this problem (and #442619 too).
--
Best Regards,
Yuri Kozlov
--- adduser-3.112+nmu1/adduser 2010-11-06 09:23:48.000000000 +0300
+++ /usr/sbin/adduser 2010-11-06 15:17:55.000000000 +0300
@@ -66,18 +66,25 @@
}
eval {
require I18N::Langinfo;
- import I18N::Langinfo qw(langinfo YESEXPR NOEXPR);
+ import I18N::Langinfo qw(langinfo CODESET YESEXPR NOEXPR);
};
if ($@) {
*langinfo = sub { return shift; };
*YESEXPR = sub { "^[yY]" };
*NOEXPR = sub { "^[nN]" };
+ *CODESET = sub { "" };
+ }
+ eval {
+ use Encode qw(decode);
+ };
+ if ($@) {
+ *decode = sub { shift; return shift; };
}
}
setlocale(LC_MESSAGES, "");
textdomain("adduser");
-my $yesexpr = langinfo(YESEXPR());
+my $yesexpr = decode(langinfo(CODESET()), langinfo(YESEXPR()));
my %config; # configuration hash
@@ -531,7 +538,7 @@
create_homedir (1); # copy skeleton data
# useradd without -p has left the account disabled (password string is '!')
- my $yesexpr = langinfo(YESEXPR());
+ my $yesexpr = decode(langinfo(CODESET()), langinfo(YESEXPR()));
if ($ask_passwd) {
for (;;) {
my $passwd = &which('passwd');
@@ -554,6 +561,7 @@
# expression will be checked to find positive answer.
print (gtx("Try again? [y/N] "));
chop ($answer=<STDIN>);
+ $answer = decode(langinfo(CODESET()), $answer);
last if ($answer !~ m/$yesexpr/o);
}
else {
@@ -571,7 +579,7 @@
&ch_gecos($new_gecos);
}
else {
- my $noexpr = langinfo(NOEXPR());
+ my $noexpr = decode(langinfo(CODESET()), langinfo(NOEXPR()));
for (;;) {
my $chfn = &which('chfn');
&systemcall($chfn, $new_name);
@@ -580,6 +588,7 @@
# expression will be checked to find positive answer.
print (gtx("Is the information correct? [Y/n] "));
chop (my $answer=<STDIN>);
+ $answer = decode(langinfo(CODESET()), $answer);
last if ($answer !~ m/$noexpr/o);
}
}