This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: Console codepage setting via chcp?
On Sep 24 17:08, andy.koppe wrote:
> 2009/9/24 Corinna Vinschen:
> > Given that in the Japanese and Chinese locale all other singlebyte
> > codepages are still available, I have a hard time to understand the
> > scheme behind this.
>
> Dissuading people from using DBCSs? Can't blame 'em.
Heh!
> > Do you think this is a problem? ?It's certainly an annoyance when
> > testing locale-specific changes, but is it relevant to users?
>
> Difficult to imagine. If it is, there are workarounds: setting the
> console to UTF-8 and using luit for conversion. Or using another
> terminal.
Right.
> > Last but not least, the alternative would be to store the Console
> > character set as an environment variable, just as the
> > "CYGWIN=codepage:[ansi:oem]" setting back in 1.5 times. ?Sigh.
>
> Hmm. How about simply using the standard locale variables again?
> Except unlike now the console charset would be set at startup rather
> than by setlocale.
Yeah., it's just... what bugs me with this approach is
- If you want to switch to a certain charset, you must do this before
the first Cygwin process in the console starts (via batch file or
system-wide setting of LC_ALL/LC_CTYPE/LANG.
- If you want to switch the console to another charset you can't do that
on the fly in Cygwin. You must either exit from the console, or start
cmd, change the locale variable in cmd, and start another Cygwin
process from there.
It would be still be nice to have something like this, IMHO:
- Default everything to UTF-8, including the console.
- Provide the setcons tool to allow switching to another charset
which is now valid for all Cygwin processes in the console.
That should be possible. I have to think about this some more...
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat