-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.library-iotype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
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
nmfisher, Syutkin, yanshouwang and imlinhanchao
Metadata
Metadata
Assignees
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.library-iotype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)