CYGWIN=codepage? Or LC_CTYPE=foo?

Kazuhiro Fujieda fujieda@jaist.ac.jp
Sun Apr 6 16:05:00 GMT 2008


>>> On Sun, 06 Apr 2008 16:39:43 +0200
>>> Corinna Vinschen <corinna-cygwin@cygwin.com> said:

> Shouldn't the (default) setting of LANG, LC_CTYPE and friends be based
> on what the underlying OS is set to?  Microsoft maintains a table which
> defines the relationship between the locale identifier used internally
> (LCID), the "Culture name" (what's used by POSIX) and the attached
> codepage.  The list is here:
>
> http://www.microsoft.com/globaldev/nlsweb/default.mspx

There are several culture names not conforming to the convention
of locale names, for example, "gsw-FR", "az-Cyrl-AZ", "zh-Hant",
and so on. I wrote the table between locale names and LCIDs for
my implementation of setlocale.

It isn't preferable such large table resides in the DLL. I will
simplify the implementation. I will make setlocale check the
codeset part only and accept the default locale or the C locale.

> Or, we check if LANG/LC_CTYPE is set and only set the codepage according
> to the setting of these variables.  Otherwise we just use the default
> ANSI codepage.

This approach is preferable. I think setting $LANG is overkill.
____
  | AIST      Kazuhiro Fujieda <fujieda@jaist.ac.jp>
  | HOKURIKU  School of Information Science
o_/ 1990      Japan Advanced Institute of Science and Technology



More information about the Cygwin-developers mailing list