Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run() shows garbled text in Windows 10 #383

Open
yfakariya opened this issue Oct 9, 2021 · 0 comments
Open

run() shows garbled text in Windows 10 #383

yfakariya opened this issue Oct 9, 2021 · 0 comments
Labels

Comments

@yfakariya
Copy link

run() and runAsync() of run.dart module shows garbled text for flutter doctor as following

[竏咯 Flutter (Channel

instead of

[√] Flutter (Channel...

I can generate this garbled text with encoding "[√]" with utf8 and then decoding it with systemEncoding.

How to reproduce

Run following in Windows which code point settings is not UTF-8 (chcp shows a number other than 65001):

run('flutter', arguments: ['doctor'])

Note that I found that normal texts are shown with explicitly specifying utf8 for RunOptions.stdoutEncoding and RunOptions.stderrEncoding, and systemEncoding is properly set to ANSI encoding of my environment.

Workaround

We can avoid this issue with passing RunOptions(stdoutEncoding: utf8, stderrEncoding: utf8, ...) for run() and runAsync().

Environments

  • grinder: 0.9.0
  • Windows: Windows10 21H1 (build 19043.1237)
  • Result of chcp: 932
@devoncarew devoncarew added the bug label Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants