I entered multi-byte characters directly in Windows Console.
But I can't get the correct byte data from stdin.
sample code:
import 'dart:io';
void main() async {
await for (var i in stdin) {
print(i);
}
}
In Powershell 7(code page 65001),
I typed 'あ'(U+3042, utf-8: 0xE38182=[227 129 130]).
Direct input -- Bad:
> dart .\bin\main.dart
あ
[0, 13, 10]
Pipe -- OK:
> echo あ | dart .\bin\main.dart
[227, 129, 130, 13, 10]
I expected the results of direct input to be the same as the pipe version.
Dart VM version: 2.7.2 (Mon Mar 23 22:11:27 2020 +0100) on "windows_x64"
Windows 10 Pro(1909)
Powershell 7.0.0
ref #41562