public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
From: Jon TURNEY <jon.turney@dronecode.org.uk>
To: cygwin-xfree@cygwin.com
Subject: Re: X11R7.5 and C.UTF-8
Date: Thu, 29 Oct 2009 15:01:00 -0000	[thread overview]
Message-ID: <4AE9AE57.8010405@dronecode.org.uk> (raw)
In-Reply-To: <4AE9A8AD.2030702@cornell.edu>

On 29/10/2009 14:37, Ken Brown wrote:
> On 10/29/2009 9:42 AM, Jon TURNEY wrote:
>> 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.
>
> $ LANG=C.UTF-8 ./Xlocale.exe
> Setting locale from LANG succeeded
> Locale is C.UTF-8
> XSupportsLocale returned false
>
> $ LANG=en_US.UTF-8 ./Xlocale.exe
> Setting locale from LANG succeeded
> Locale is en_US.UTF-8
> XSupportsLocale returned true
>
> $ unset LANG
>
> $ ./Xlocale.exe
> Setting locale from LANG succeeded
> Locale is C
> XSupportsLocale returned true
>
> $ uname -a
> CYGWIN_NT-5.1 markov 1.7.0(0.214/5/3) 2009-10-03 14:33 i686 Cygwin

I suppose I should show you mine, then

$ LANG=C.UTF-8 ./Xlocale
Setting locale from LANG failed
Locale is C
XSupportsLocale returned true

$ LANG=en_US.UTF-8 ./Xlocale
Setting locale from LANG succeeded
Locale is en_US.UTF-8
XSupportsLocale returned true

$ unset LANG

$  ./Xlocale
Setting locale from LANG succeeded
Locale is C
XSupportsLocale returned true

$ uname -a
CYGWIN_NT-5.1 byron 1.7.0(0.212/5/3) 2009-09-11 01:25 i686 Cygwin

Okay, well this makes sense now :-(

Appropriate data needs to exist in /usr/share/X11/locale for the C.UTF-8 
locale, but it doesn't at the moment. Let me see if I can find it :-)

--
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/


  reply	other threads:[~2009-10-29 15:01 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-28 14:22 Ken Brown
2009-10-28 21:23 ` Thomas Dickey
2009-10-28 21:48   ` Ken Brown
2009-10-28 22:07     ` Andy Koppe
2009-11-28 12:22       ` Ken Brown
2009-11-28 13:35         ` Andy Koppe
2009-11-28 15:29           ` Ken Brown
2009-12-03  5:27         ` Linda Walsh
2009-12-03  7:37           ` Charles Wilson
2009-12-03  7:48           ` Andy Koppe
2009-12-03  9:09             ` Corinna Vinschen
2009-12-03  9:55             ` Thomas Dickey
2009-12-03 13:16               ` Andy Koppe
2009-12-03 13:48                 ` Corinna Vinschen
2009-12-04  4:30               ` Eric Blake
2009-12-04  9:45                 ` Thomas Dickey
2009-10-28 21:49   ` Andy Koppe
2009-10-28 23:51     ` Andy Koppe
2009-10-28 22:19   ` Charles Wilson
2009-10-28 23:52 ` Jon TURNEY
2009-10-29  0:07   ` Andy Koppe
2009-10-29 13:42     ` Jon TURNEY
2009-10-29 13:56       ` Corinna Vinschen
2009-10-29 14:54         ` Jon TURNEY
2009-10-29 14:37       ` Ken Brown
2009-10-29 15:01         ` Jon TURNEY [this message]
2009-10-29 19:11           ` Jon TURNEY
2009-10-29 20:20             ` Andy Koppe
2009-11-03 21:00               ` Jon TURNEY
2009-11-04  6:34                 ` Andy Koppe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AE9AE57.8010405@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=cygwin-xfree@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).