in reply to Using setlocale() on Windows with utf-8 support
On Windows 11, perl-5.38.0, I then get:use strict; use warnings; use v5.10; use POSIX qw(LC_ALL setlocale strftime); my $locale = $ARGV[0]; say "$locale: ", POSIX::setlocale(LC_ALL, $locale); my $march = strftime("%B", 0, 0, 0, 1, 2, 123); say $march;
It seems that the POSIX::setlocale() call is not returning anything.D:\pscrpt>perl try.pl de_DE.UTF-8 Use of uninitialized value in say at try.pl line 7. de_DE.UTF-8: March
That's not my idea of "working".D:\>perl -MPOSIX -wle "$loc = POSIX::setlocale( &POSIX::LC_ALL, 'de' ) +; print $loc;" Use of uninitialized value $loc in print at -e line 1.
Cheers,C: March (5 bytes)
|
|---|