From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6509 invoked by alias); 29 Oct 2009 13:42:11 -0000 Received: (qmail 6500 invoked by uid 22791); 29 Oct 2009 13:42:10 -0000 X-SWARE-Spam-Status: No, hits=-3.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SARE_SUB_ENC_UTF8 X-Spam-Check-By: sourceware.org Received: from smtpout.karoo.kcom.com (HELO smtpout.karoo.kcom.com) (212.50.160.34) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Oct 2009 13:42:03 +0000 Received: from 213-152-38-55.dsl.eclipse.net.uk (HELO [192.168.0.8]) ([213.152.38.55]) by smtpout.karoo.kcom.com with ESMTP; 29 Oct 2009 13:42:00 +0000 Message-ID: <4AE99BAD.6060303@dronecode.org.uk> Date: Thu, 29 Oct 2009 13:42:00 -0000 From: Jon TURNEY Reply-To: cygwin-xfree@cygwin.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4pre) Gecko/20090915 Thunderbird/3.0b4 MIME-Version: 1.0 To: cygwin-xfree@cygwin.com CC: andy.koppe@gmail.com, kbrown@cornell.edu Subject: Re: X11R7.5 and C.UTF-8 References: <4AE8539E.9080004@cornell.edu> <4AE8D942.8020806@dronecode.org.uk> <416096c60910281707t3249dfb7tc6d0caf0e57ba626@mail.gmail.com> In-Reply-To: <416096c60910281707t3249dfb7tc6d0caf0e57ba626@mail.gmail.com> Content-Type: multipart/mixed; boundary="------------050708010508060804080808" Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Reply-To: cygwin-xfree@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com X-SW-Source: 2009-10/txt/msg00124.txt.bz2 --------------050708010508060804080808 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 2173 On 29/10/2009 00:07, Andy Koppe wrote: > 2009/10/28 Jon TURNEY: >> On 28/10/2009 14:22, Ken Brown wrote: >>> >>> X11R7.5 doesn't like the (default) locale C.UTF-8. If I start the >>> server with 'LANG=C.UTF-8 /usr/bin/startxwin.bat', the server exits >>> immediately, and the log has complaints about the locale. If I instead >>> use 'LANG=en_US.UTF-8', there's no problem. I've attached both logs and >>> cygcheck output. >> >> Thanks for the bug report. >> >> I'm afraid I'm not immediately able to reproduce this, though, using the >> command you give. > > You might have LC_ALL or LC_CTYPE set, which would override LANG. Or > perhaps startxwin.bat overrides things somewhere along the way? > > To avoid all that, you could try invoking Xwin directly with LC_ALL > set, which is top dog among locale variables. > > LC_ALL=C.UTF-8 xwin -multiwindow& > > It fails with en.UTF-8 too (which also is a legal Cygwin locale), but > it works with en_US.UTF-8. Nope, I don't have LC_ALL or LC_CTYPE set This is pretty curious, since all XSupportsLocale() should be doing effectively is checking if setlocale (LC_ALL, NULL) returns a name it understands. Perhaps you can try the attached small test program. I haven't been following the discussion about C.UTF-8 closely, but curiously, for me at least, this test program shows that setlocale(LC_ALL, "") fails with LANG=C.UTF-8 (so that doesn't actually seem to be a valid locale, although if it's the default it probably doesn't make much difference), but this means that a subsequent setlocale(LC_ALL, NULL) just returns "C" Possibly C.UTF-8 needs adding to /usr/share/X11/locale/locale.alias and locale.dir. in any case, it's probably also a bug that the Xserver considers XSupportsLocale() failure a critical error, rather than continuing with a warning, but I'd like to get to the bottom of this first... >> The significant change is probably that libX11 is no longer built with >> X_LOCALE (so that libX11 uses the native locale support rather than it's >> own). >> Exactly why this would cause a problem, I don't know. > > Hmm, that sounds like it should have improved matters if anything. Indeed :-) --------------050708010508060804080808 Content-Type: application/x-itunes-itlp; name="Xlocale.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="Xlocale.c" Content-length: 562 I2luY2x1ZGUgPFgxMS9YLmg+CiNpbmNsdWRlIDxYMTEvWGxpYi5oPgojaW5j bHVkZSA8WDExL1hsb2NhbGUuaD4KI2luY2x1ZGUgPHN0ZGlvLmg+CgovLyAg Z2NjIFhsb2NhbGUuYyAgLWxYMTEgLW8gWGxvY2FsZQoKbWFpbigpCnsKICBj aGFyICpzID0gc2V0bG9jYWxlIChMQ19BTEwsICIiKTsKICBwcmludGYoIlNl dHRpbmcgbG9jYWxlIGZyb20gTEFORyAlc1xuIiwgKHMgIT0gTlVMTCkgPyAi c3VjY2VlZGVkIiA6ICJmYWlsZWQiKTsKICBjaGFyICpsID0gc2V0bG9jYWxl IChMQ19BTEwsIE5VTEwpOwogIHByaW50ZigiTG9jYWxlIGlzICVzXG4iLCBs KTsKICBpbnQgciA9IFhTdXBwb3J0c0xvY2FsZSgpOwogIHByaW50ZigiWFN1 cHBvcnRzTG9jYWxlIHJldHVybmVkICVzXG4iLCByID8gInRydWUiIDogImZh bHNlIik7Cn0K --------------050708010508060804080808 Content-Type: text/plain; charset=us-ascii Content-length: 223 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/ --------------050708010508060804080808--