[ANNOUNCEMENT] cygwin 3.2.0-0.1 (TEST)

Takashi Yano takashi.yano@nifty.ne.jp
Wed Mar 10 11:31:46 GMT 2021


On Wed, 10 Mar 2021 03:38:52 +0000
André Bleau wrote:
> Hi,
> 
> Last year, I reported a problem about console output with pcon support. For the simple test program, see:
> https://cygwin.com/pipermail/cygwin/2020-May/244742.html
> 
> I was told (https://cygwin.com/pipermail/cygwin/2020-May/244745.html) that I need to inset the following lines in my program:
> 
> #include <windows.h>
> ...
> DWORD mode;
> GetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), &mode);
> mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
> SetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), mode);
> 
> It worked. 
> 
> Now, I just downloaded cygwin 3.2.0-0.1 and retested my program with and without the above lines. Both work correctly.
> 
> Are the above lines no longer necessary? In that case, it could be useful to say so in the release notes.

This is due to behaviour change of pseudo console itself.
In Win10 20H2 (and perhaps also in 2004),
ENABLE_VIRTUAL_TERMINAL_PROCESSNG is set by default in pseudo
console. However, older Win10 such as 1809, this flag is not
set. Therefore, you need to set this flag explicitly.

Also, in command prompt, this flag is not set even with Win10
20H2. So, I recommend to keep this flag set for portability.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>


More information about the Cygwin mailing list