From: Jarkko Hietaniemi Date: Tue, 19 Jan 1999 08:58:17 +0000 (+0000) Subject: Show LANGUAGE env var when needed. (Augment change #2645). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3aeabbed7742629accd365cc24e3608278252b86;p=p5sagit%2Fp5-mst-13.2.git Show LANGUAGE env var when needed. (Augment change #2645). p4raw-link: @2645 on //depot/cfgperl: 528d65adbfbca8f0de82f889e6bbf92ea5fb07c8 p4raw-id: //depot/cfgperl@2646 --- diff --git a/util.c b/util.c index 2f5fcf8..77dd842 100644 --- a/util.c +++ b/util.c @@ -621,6 +621,9 @@ perl_init_i18nl10n(int printwarn) #ifdef USE_LOCALE_NUMERIC char *curnum = NULL; #endif /* USE_LOCALE_NUMERIC */ +#ifdef __GLIBC__ + char *language = PerlEnv_getenv("LANGUAGE"); +#endif char *lc_all = PerlEnv_getenv("LC_ALL"); char *lang = PerlEnv_getenv("LANG"); bool setlocale_failure = FALSE; @@ -724,6 +727,14 @@ perl_init_i18nl10n(int printwarn) PerlIO_printf(PerlIO_stderr(), "perl: warning: Please check that your locale settings:\n"); +#ifdef __GLIBC__ + PerlIO_printf(PerlIO_stderr(), + "\tLANGUAGE = %c%s%c,\n", + language ? '"' : '(', + language ? language : "unset", + language ? '"' : ')'); +#endif + PerlIO_printf(PerlIO_stderr(), "\tLC_ALL = %c%s%c,\n", lc_all ? '"' : '(', diff --git a/utils/perlbug.PL b/utils/perlbug.PL index 842ff74..f82b5ba 100644 --- a/utils/perlbug.PL +++ b/utils/perlbug.PL @@ -528,7 +528,7 @@ EOF Environment for perl $]: EOF for my $env (sort - (qw(PATH LD_LIBRARY_PATH LANG PERL_BADLANG SHELL HOME LOGDIR), + (qw(PATH LD_LIBRARY_PATH LANG PERL_BADLANG SHELL HOME LOGDIR LANGUAGE), grep /^(?:PERL|LC_)/, keys %ENV) ) { print OUT " $env",