A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Perl/perl5/issues/18701 below:

Reading non-ASCII characters from the console on Windows doesn't work when codepage is 65001 · Issue #18701 · Perl/perl5 · GitHub

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

> chcp 65001
> perl -E "while(<>) { printf qq<%vd\n>, $_ }"
<input ąść and press enter>
0.0.0.10

Expected behavior

> chcp 65001
> perl -E "while(<>) { printf qq<%vd\n>, $_ }"
<input ąść and press enter>
196.133.197.155.196.135.10

Perl configuration

It's broken on all perl versions including blead.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4