-
Notifications
You must be signed in to change notification settings - Fork 9
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
Optimize stdout&stderr decoding for Windows ANSI Code Page #16
Comments
At the moment It would make sense to include
The only idea that I can think of is internally check the Honestly, I don't know how |
Thanks for you reply! proc.stdout.on('data', data => stdout += data.toString()) In my own opinion, it would be much better and friendlier if there is an option |
Oh, that's what you mean. But On my current PC the default code page is proc.stdout.on('data', data => stdout += iconv.decode(data, 'cp866')) But when I try to read something else (for example,
In my case So, the only thing you can do to raw data is convert it from your system code page to utf8 (which most probably could be automated). And again, it's just my own research so I may be wrong. |
Вот, automating this process is a really great idea! |
I just did some tests and:
So both I want to say, either In short, the idea looks good for particular cases, but it would make code bloated without any great benefit globally. I wonder what @MikeKovarik thinks about all of that. |
master...asinbow:patch-1
This is actually is NOT a PR, but a suggestion.
I have seen whole content of issue #9, and changes in
rage-edit/src/Registry.mjs
Line 44 in 6e18ee8
cmd.exe /c chcp
has side effect, and I think it should be the only choice.In our own application we have implemented a function
ChangeCodePage
by usingnode-ffi
:So, if there is a
Registry.decodeStdout
option, life would be much easier!💯
The text was updated successfully, but these errors were encountered: