This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Console codepage setting via chcp?


2009/9/23 Corinna Vinschen:
> Right now, if you switch the charset via the setlocale function, you
> also switch the charset used for console output.

That's quite a unique advantage of the Cygwin console actually,
because it means you always get correct output even if you switch
charset on the fly.

A normal terminal, on the other hand, doesn't actually know what
charset the app running inside it is using. Hence, for correct output,
the user has to make sure the terminal and application charsets match,
or use something like 'luit' to translate between them.


>ÂThis is done on the
> grounds that the console isn't capable to switch the console set by
> itself, as it is for terminal emulators like mintty. The problem with
> this approach is even documented in setup2.sgml, just commented out.
> If you use a tool like ssh to connect to a remote machine, then ssh
> uses potentially another locale and charset than the remote shell.

> ssh is always running in the "C" locale

Are you sure? Shouldn't it be calling 'setlocale(LC_ALL, "")', thereby
configuring the console output according to the locale variables?

Andy


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]