-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e9280d1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hello @dsherret , I think this is not correct on windows.
Consider this nodejs code:
output is
You will see the encoding is actually
gbk
on my machine.Even you specify the encoding to
utf-8
, it just useutf-8
encoding to deocde thegbk
buffer.I think you should see more vscode source code to see how to do
exec
on windows.Or you can try this this way on windows.
note: if you use
chcp 65001
the output ofcmd.exe
will become English. But usedir
to show some Chinese filename, the encoding is actuallyutf-8
.e9280d1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@heroboy thanks! I actually misread that SO post. I’m going to reopen the bug.