develooper Front page | perl.perl5.porters | Postings from August 2009

cygwin setlocale warning

Thread Next
Reini Urban
August 20, 2009 06:06
cygwin setlocale warning
Message ID:
The new cygwin-1.7 supports setlocale(), but is restrictive in not
supporting lowercase codepage names,
contrary to linux e.g.

This was causing me headaches and I wonder if we should

1) print a warning along

$ LC_ALL=en_US.utf-8 perl5.10.1d -e0
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LC_ALL = "en_US.utf-8",
        LANG = (unset)
    are supported and installed on your system.
    CYGWIN requires an uppercase codepage, like en_US.UTF-8.
perl: warning: Falling back to the standard locale ("C").

--- locale.c.orig       2009-03-19 21:23:07.000000000 +0100
+++ locale.c    2009-08-20 14:56:37.984375000 +0200
@@ -428,6 +428,12 @@

                          "    are supported and installed on your system.\n");
+#ifdef __CYGWIN__
+           PerlIO_printf(Perl_error_log,
+                         "    CYGWIN requires an uppercase codepage,
like en_US.UTF-8.\n");

 #ifdef LC_ALL

2) try to fix it locally (putenv with uppercased codepage),
3) keep the error without hint.

Reini Urban 

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About