New implementation of pseudo console support (experimental)

Johannes Schindelin Johannes.Schindelin@gmx.de
Mon Aug 31 15:56:44 GMT 2020


Hi Takashi,

On Mon, 31 Aug 2020, Takashi Yano wrote:

> On Mon, 31 Aug 2020 16:22:20 +0200 (CEST)
> Johannes Schindelin wrote:
> >
> > On Mon, 31 Aug 2020, Takashi Yano wrote:
> >
> > > On Mon, 31 Aug 2020 14:49:04 +0200 (CEST)
> > > Johannes Schindelin wrote:
> > >
> > > > Sorry to latch onto this thread with something slightly different, but we
> > > > do see pretty serious encoding problems (both with and without
> > > > `CYGWIN=disable_pcon`) in the Git for Windows and the MSYS2 projects. For
> > > > example, in https://github.com/msys2/MSYS2-packages/issues/1974 the
> > > > following issue was reported. If you compile a _MINGW_ program from this
> > > > source code:
> > > >
> > > > -- snip --
> > > > #include <stdio.h>
> > > >
> > > > int main(){
> > > >   puts("Привет мир! Hello world!");
> > > >   return 0;
> > > > }
> > > > -- snap --
> > > >
> > > > and then execute it, you will see this output:
> > > >
> > > > -- snip --
> > > > Привет мир! Hello world!
> > > > -- snap --
> > >
> > > I guess your program (binary exe) does not work as you expect
> > > in command prompt as well. If you want to use UTF-8 coding in
> > > output, you should add SetConsoleOutputCP(CP_UTF8) call befere
> > > puts().
> >
> > That may be, but I would like to point out that the very same executable
> > worked quite well in a MinTTY using v3.0.7...
>
> at the expense of garbled output for apps which use native
> code page of the system in the correct maner.

Are you referring to apps that call the SetConsoleOutputCP() function? If
so, I am asking myself what would be broken. Because apps that do _not_
call that function (expecting UTF-8 to be active) would be fixed, while
apps that _do_ call that function would not care if the Cygwin runtime
changed it.

Ciao,
Johannes


More information about the Cygwin-developers mailing list