You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reading non-ASCII characters from the console on Windows doesn't work when codepage is 65001. It's caused by a bug in Windows: microsoft/terminal#4551
tl;dr: ReadFile() and ReadConsoleA() return zeros instead of non-ASCII characters when the console codepage is set to 65001. It's broken on all Windows versions, including the latest Windows 10 20H2.
Due to a bug in Windows, ReadFile() and ReadConsoleA() (and thus
_read()), return zeros instead of non-ASCII characters when the console
codepage is set to 65001. See this ticket for more details:
microsoft/terminal#4551
This commit works around that bug by using ReadConsoleW() inside
win32_read() when the passed fd points to the console and the console
codepage is set to 65001.
FixesPerl#18701
Due to a bug in Windows, ReadFile() and ReadConsoleA() (and thus
_read()), return zeros instead of non-ASCII characters when the console
codepage is set to 65001. See this ticket for more details:
microsoft/terminal#4551
This commit works around that bug by using ReadConsoleW() inside
win32_read() when the passed fd points to the console and the console
codepage is set to 65001.
FixesPerl#18701
Due to a bug in Windows, ReadFile() and ReadConsoleA() (and thus
_read()), return zeros instead of non-ASCII characters when the console
codepage is set to 65001. See this ticket for more details:
microsoft/terminal#4551
This commit works around that bug by using ReadConsoleW() inside
win32_read() when the passed fd points to the console and the console
codepage is set to 65001.
Fixes#18701
Corion
pushed a commit
to Corion/perl5
that referenced
this issue
Jun 20, 2021
Due to a bug in Windows, ReadFile() and ReadConsoleA() (and thus
_read()), return zeros instead of non-ASCII characters when the console
codepage is set to 65001. See this ticket for more details:
microsoft/terminal#4551
This commit works around that bug by using ReadConsoleW() inside
win32_read() when the passed fd points to the console and the console
codepage is set to 65001.
FixesPerl#18701
Description
Reading non-ASCII characters from the console on Windows doesn't work when codepage is 65001. It's caused by a bug in Windows: microsoft/terminal#4551
tl;dr: ReadFile() and ReadConsoleA() return zeros instead of non-ASCII characters when the console codepage is set to 65001. It's broken on all Windows versions, including the latest Windows 10 20H2.
This issue was discovered by a reddit user.
I'll submit a PR with a proposed workaround soon.
Steps to Reproduce
Expected behavior
Perl configuration
It's broken on all perl versions including blead.
The text was updated successfully, but these errors were encountered: