Commit 65e825f6 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

[bug] Most of characters in pages are garbled with Perl 5.22.0 or later.

Users in non-Latin-1 languages (language other than "en", "de", "fr", ...) will notice this bug.

Background: Starting with Perl 5.22.0, POSIX::strftime() returns Unicode (utf8 flag set) string under UTF-8 locale.

Sympa::Language::gettext_strftime() uses it to format localized date/time, and utf8-flagged texts were mixed in the output.

Fixed by dropping utf8 flag from the result of POSIX::strftime().
parent 55174639
......@@ -31,6 +31,7 @@ use strict;
use warnings;
use base qw(Class::Singleton);
use Encode qw();
use Locale::Messages;
use POSIX qw();
......@@ -688,6 +689,7 @@ sub gettext_strftime {
POSIX::setlocale(POSIX::LC_TIME(), $self->{locale_time});
my $ret = POSIX::strftime($format, @args);
POSIX::setlocale(POSIX::LC_TIME(), $orig_locale);
return $ret;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment