Open Bug 1684464 Opened 5 years ago

Use of uninitialized value $encoding in concatenation (.) or string > at Bugzilla/Install/Util.pm line 607, <DATA> line 75

Categories

(Bugzilla :: Installation & Upgrading, defect)

5.0.6
x86_64
Windows
defect

Tracking

()

People

(Reporter: tschoening, Unassigned)

Details

This has been reported on the mailing list:

https://groups.google.com/g/mozilla.support.bugzilla/c/Ji8o7bBBhAw

Use of uninitialized value $encoding in concatenation (.) or string
at Bugzilla/Install/Util.pm line 607, <DATA> line 75

Debugging using WARN on the mentioned line:

my $encoding;
if (ON_WINDOWS and eval { require Win32::Console }) {

  # Although setlocale() works on Windows, it doesn't always return
  # the current *console's* encoding. So we use OutputCP here instead,
  # when we can.
  $encoding = Win32::Console::OutputCP();
  warn('Windows+Console, but NO encoding.');
}
else {
  my $locale = setlocale(LC_CTYPE);
  warn('Other with locale: ' . $locale);
  if ($locale =~ /\.([^\.]+)$/) {
    $encoding = $1;
  }
}
$encoding = "cp$encoding" if ON_WINDOWS;

Result:

Other with locale: C at Bugzilla/Install/Util.pm line 604.

That result is simply not supported by applied regular expression and no fallback is used as well. This happened with ActiveState Perl 5.18.1.

You need to log in before you can comment on or make changes to this bug.