Skip to content

Commit 3f5b30a

Browse files
authored
make sure terminal uses codepage utf-8
1 parent 9ff67c2 commit 3f5b30a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/terminal.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,15 @@ export default class PIOTerminal {
1919
envClone.PATH = process.env.PLATFORMIO_PATH;
2020
envClone.Path = process.env.PLATFORMIO_PATH;
2121
}
22-
return vscode.window.createTerminal({
22+
const terminal = vscode.window.createTerminal({
2323
name: 'pioarduino CLI',
2424
env: envClone,
2525
});
26+
// Set Codepage to UTF-8, if Windows is used
27+
if (process.platform === "win32") {
28+
terminal.sendText('chcp 65001');
29+
}
30+
return terminal;
2631
}
2732

2833
sendText(text) {

0 commit comments

Comments
 (0)