From 71f44e682fe7b0f68d3a6a609aa5321c081c3fcc Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Thu, 1 Jul 2010 14:00:29 -0700 Subject: Bug 382398: Make checksetup.pl localized messages be output in the console's charset r=timello, a=mkanat --- Bugzilla.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Bugzilla.pm') diff --git a/Bugzilla.pm b/Bugzilla.pm index 2f21c6a18..eedcb85ee 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -44,7 +44,7 @@ use Bugzilla::Extension; use Bugzilla::DB; use Bugzilla::Install::Localconfig qw(read_localconfig); use Bugzilla::Install::Requirements qw(OPTIONAL_MODULES); -use Bugzilla::Install::Util; +use Bugzilla::Install::Util qw(init_console); use Bugzilla::Template; use Bugzilla::User; use Bugzilla::Error; @@ -82,7 +82,12 @@ use constant SHUTDOWNHTML_EXIT_SILENTLY => qw( # Note that this is a raw subroutine, not a method, so $class isn't available. sub init_page { - (binmode STDOUT, ':utf8') if Bugzilla->params->{'utf8'}; + if (Bugzilla->usage_mode == USAGE_MODE_CMDLINE) { + init_console(); + } + elsif (Bugzilla->params->{'utf8'}) { + binmode STDOUT, ':utf8'; + } if (${^TAINT}) { # Some environment variables are not taint safe -- cgit v1.2.1