Skip to content

Commit 71ce8c7

Browse files
Bramkhwilliamson
authored andcommitted
Add whitespace in 'Setting locale failed' error
When LC_ALL doesn't exist(*) then the error message printed wasn't readable. Before: $ LC_ALL= LC_NUMERIC='aa_BB' LC_PAPER='cc_DD' ./perl -e1 perl: warning: Setting locale failed for the categories: LC_NUMERICLC_PAPERperl: warning: Please check that your locale settings: LANGUAGE = "en_US:en", ... After: $ LC_ALL= LC_NUMERIC='aa_BB' LC_PAPER='cc_DD' ./perl -e1 perl: warning: Setting locale failed for the categories: LC_NUMERIC LC_PAPER perl: warning: Please check that your locale settings: ... (The output got mangled in commit e5f10d4) (*) I faked this by adding '#undef LC_ALL' inside locale.c. This does cause some test failure since some tests assume 'LC_ALL' is present.
1 parent f9757a5 commit 71ce8c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

locale.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3575,11 +3575,11 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
35753575
# else /* !LC_ALL */
35763576

35773577
PerlIO_printf(Perl_error_log,
3578-
"perl: warning: Setting locale failed for the categories:\n\t");
3578+
"perl: warning: Setting locale failed for the categories:\n");
35793579

35803580
for (j = 0; j < NOMINAL_LC_ALL_INDEX; j++) {
35813581
if (! curlocales[j]) {
3582-
PerlIO_printf(Perl_error_log, category_names[j]);
3582+
PerlIO_printf(Perl_error_log, "\t%s\n", category_names[j]);
35833583
}
35843584
else {
35853585
Safefree(curlocales[j]);

0 commit comments

Comments
 (0)