X11R7.5 and C.UTF-8

Jon TURNEY jon.turney@dronecode.org.uk
Thu Oct 29 13:42:00 GMT 2009


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 :-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Xlocale.c
Type: application/x-itunes-itlp
Size: 414 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-xfree/attachments/20091029/80ca42e1/attachment.bin>
-------------- next part --------------
--
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/


More information about the Cygwin-xfree mailing list