New implementation of pseudo console support (experimental)

Thomas Wolff towo@towo.net
Tue Sep 1 08:56:15 GMT 2020


Am 01.09.2020 um 07:00 schrieb Johannes Schindelin:
> Hi Thomas,
>
> On Mon, 31 Aug 2020, Thomas Wolff wrote:
>
>> Am 31.08.2020 um 21:17 schrieb Johannes Schindelin:
>>> [...]
>>>
>>> But that does _not_ reinstate the previous behavior when Pseudo
>>> Console support is disabled.
>>>
>>> Now, I would call that a regression (the entire idea of `disable_pcon`
>>> was to fall back to the previous behavior, no?). And I do not really
>>> understand where it comes from, that regression.
>> I wouldn't quite call it a regression as it disables buggy behaviour
>> which was used as a workaround for a buggy system environment. But
>> arguably you could expect such an option to fall back to previous buggy
>> behaviour.
> I think I got it. After you called this kind of application buggy for a
> dozen times, I think I finally understood. You think they are buggy!
>
> And while you sink into your comfy chair, thinking that you settled the
> issue, in reality it is not settled at all. Arguing whether it is correct
> for an application not to call `SetConsoleOutputCP()` does not help
> anyone. Just because the behavior is considered undefined does not mean
> that we should make the situation _intentionally_ worse.
>
> That is, if we can get back to a spot where the (yes, buggy, buggy,
> BUGGY!) applications behave in at least roughly the same way as before,
> users will be much better off.
I'm fine with that, I was just trying to sort out the situation and 
explain how I understand it.
In fact, your patch could be taken as an alternative complement to the 
ConPTY support;
for completeness, it could handle other charsets as well.
And I'm curious whether that'll work seamlessly. My previous proposal 
"winpty injection" (2018) was rejected because it failed in some special 
case reported by you... Would be nice to get this working, though.
Thomas

> The work-around could be e.g. what I suggested in my reply to Corinna (and
> which is the equivalent of what you suggested -- "just run chcp once" --
> just without putting the burden on the users' shoulders, by calling
> `SetConsoleOutputCP()` in the runtime, once).
>
> In any case, my question why `disable_pcon` still uses the console output
> code page was directed more at Takashi than you (or anybody else familiar
> with that code path).
>
> Ciao,
> Johannes



More information about the Cygwin-developers mailing list