This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: CYGWIN=codepage? Or LC_CTYPE=foo?
On Apr 6 13:13, Corinna Vinschen wrote:
> So, given my vague understanding of this language stuff, the conversion
> from wide char to multibyte string *can* be based on the notion the
> applications have of the language/codepage. Which sounds to me as if
> using LANG/LC_CTYPE would also make sense for Cygwin's internal
> conversions.
And while I already confused myself no end, here's another question.
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
In theory we could fetch the current LCID and set $LANG and the
internally used codepage according to the table.
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.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat