From 6438fcfe70712a019138cd0b4321867db74418e8 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Sun, 1 Oct 2023 11:31:07 +0000 Subject: [PATCH] Merge pull request #1498 from ailin-nemui/perl5380locale Restore locale after loading Perl (cherry picked from commit 48bc90eb17ec3c6549afd69c5d6f16d07fd57db0) --- src/perl/irssi-core.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/perl/irssi-core.pl b/src/perl/irssi-core.pl index 46066a38..0999de9e 100644 --- a/src/perl/irssi-core.pl +++ b/src/perl/irssi-core.pl @@ -52,3 +52,10 @@ sub eval_file { die "cap_sasl has been unloaded from Irssi ".Irssi::version()." because it conflicts with the built-in SASL support. See /help network for configuring SASL or read the ChangeLog for more information."; } } + +if ( $] >= 5.037005 && $] <= 5.038000 ) { + # https://github.com/Perl/perl5/issues/21366 + print STDERR "\e7 \e[A Irssi: applying locale workaround for Perl 5.38.0 \e8"; + require POSIX; + POSIX::setlocale(&POSIX::LC_ALL, ""); +}