From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27485 invoked by alias); 5 Oct 2011 16:04:33 -0000 Received: (qmail 27471 invoked by uid 22791); 5 Oct 2011 16:04:32 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-vbr16.xs4all.nl (HELO smtp-vbr16.xs4all.nl) (194.109.24.36) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 05 Oct 2011 16:04:12 +0000 Received: from [192.168.178.22] (waterlander.xs4all.nl [83.160.52.146]) (authenticated bits=0) by smtp-vbr16.xs4all.nl (8.13.8/8.13.8) with ESMTP id p95G4AcZ026357 for ; Wed, 5 Oct 2011 18:04:10 +0200 (CEST) (envelope-from waterlan@xs4all.nl) Message-ID: <4E8C7FFB.6060707@xs4all.nl> Date: Wed, 05 Oct 2011 16:04:00 -0000 From: Erwin Waterlander User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: cygwin started speaking German today References: <4E68AF35.9030002@cwilson.fastmail.fm> <201109082344.55506.bruno@clisp.org> <4E69D9EA.2050004@cwilson.fastmail.fm> <20110909145921.GA27289@calimero.vinschen.de> <4E6F7AA1.4090808@redhat.com> <20111004122837.GA27229@calimero.vinschen.de> <4E8B0007.5020500@cwilson.fastmail.fm> <20111004142920.GA15757@calimero.vinschen.de> <4E8B4A86.5000607@xs4all.nl> <20111004182042.GA22299@calimero.vinschen.de> In-Reply-To: <20111004182042.GA22299@calimero.vinschen.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-10/txt/msg00085.txt.bz2 Op 4-10-2011 20:20, Corinna Vinschen schreef: > On Oct 4 20:03, Erwin Waterlander wrote: >> Corinna Vinschen schreef, Op 4-10-2011 16:29: >>> Does it? Even if I'm running a german OS, I absolutely hate to see >>> german diagnostic output from gcc, and I absolutely hate certain >>> programs using non-ASCII chars in output. (In)famous examples are >>> Unicode quoting chars rather than ' or ", or using the Unicode >>> hyphen character rather than -. But that's just me. >> You got used to ASCII, like all the old-timers... ;) >> export LANG=C is your solution. >> >> By the way, I noticed that with the default locale C.UTF-8 the >> nl_langinfo(CODESET) C function returns wrongly >> "ISO-8859-1", > Not for me: > > $ cat> setl.c< #include > #include > #include > > int main(int argc, char **argv) > { > char *loc; > if (argc> 1) > loc = setlocale (LC_ALL, argv[1]); > else > loc = setlocale (LC_CTYPE, NULL); > printf ("locale: %s charset: %s\n", loc, nl_langinfo (CODESET)); > return 0; > } > EOF > $ gcc -o setl setl.c > $ ./setl > locale: C charset: ANSI_X3.4-1968 > $ ./setl C > locale: C charset: ANSI_X3.4-1968 > $ ./setl C.utf8 > locale: C.utf8 charset: UTF-8 > $ ./setl C.UTF-8 > locale: C.UTF-8 charset: UTF-8 > > > Corinna > Hi, My program (wcd) uses gettext/libintl. Libintl is causing the effect. Libintl is not working properly with a locale C.UTF-8. That is a serious problem. #include #include #include #include int main(int argc, char **argv) { char *loc; if (argc > 1) loc = setlocale (LC_ALL, argv[1]); else loc = setlocale (LC_CTYPE, ""); bindtextdomain("setl","/usr/share/locale"); textdomain("setl"); printf ("locale: %s charset: %s\n", loc, nl_langinfo (CODESET)); return 0; } waterlan@erwin2 ~/tmp $ gcc -o setl setl.c -lintl waterlan@erwin2 ~/tmp $ echo $LANG C.UTF-8 waterlan@erwin2 ~/tmp $ ./setl locale: en_US charset: ISO-8859-1 waterlan@erwin2 ~/tmp $ locale LANG=C.UTF-8 LC_CTYPE="C.UTF-8" LC_NUMERIC="C.UTF-8" LC_TIME="C.UTF-8" LC_COLLATE="C.UTF-8" LC_MONETARY="C.UTF-8" LC_MESSAGES="C.UTF-8" LC_ALL= waterlan@erwin2 ~/tmp $ export LANG=nl_NL.UTF-8 waterlan@erwin2 ~/tmp $ ./setl locale: nl_NL.UTF-8 charset: UTF-8 waterlan@erwin2 ~/tmp $ locale LANG=nl_NL.UTF-8 LC_CTYPE="nl_NL.UTF-8" LC_NUMERIC="nl_NL.UTF-8" LC_TIME="nl_NL.UTF-8" LC_COLLATE="nl_NL.UTF-8" LC_MONETARY="nl_NL.UTF-8" LC_MESSAGES="nl_NL.UTF-8" LC_ALL= -- Erwin Waterlander waterlan@xs4all.nl Zeelsterstraat 59B, 5652 EB Eindhoven, The Netherlands www: http://www.xs4all.nl/~waterlan/ -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple