On 01/11/2016 12:51 PM, Eli Zaretskii wrote: >> Cc: 22344@debbugs.gnu.org >> From: Clément Pit--Claudel >> Date: Mon, 11 Jan 2016 12:18:27 -0500 >> >> Here is a simplified test case, which only assumes node.js: >> >> * In a file C:\blackhole.js >> >> function blackhole() { >> var stream = process.openStdin(); >> stream.setEncoding("utf-8"); >> stream.on('data', function (chunk) { process.stdout.write(chunk); }); >> } >> blackhole(); > > Thanks. Are all the affected programs written in JavaScript? Do they > all set stdin encoding to UTF-8? If so, does the problem go away if > you remove the line that sets the encoding? No, the following javascript implementation of cat also reproduces the issue: function blackhole() { process.stdin.resume(); process.stdin.setEncoding("ascii"); process.stdin.on('data', function (chunk) { process.stdout.write(chunk); }); } blackhole();