Skip to content

Commit a7d2a62

Browse files
authored
set explicit codepage utf8 for Windows
1 parent 848f54a commit a7d2a62

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/terminal.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,16 @@ export default class PIOTerminal {
2626
}
2727

2828
sendText(text) {
29-
if (!this._instance || this._instance.exitStatus !== undefined) {
30-
this._instance = this.new();
29+
if (!this._instance || this._instance.exitStatus !== undefined) {
30+
this._instance = this.new();
31+
// Set Codepage to UTF-8, if Windows is used
32+
if (process.platform === "win32") {
33+
this._instance.sendText('chcp 65001');
3134
}
32-
this._instance.sendText(text);
33-
this._instance.show();
3435
}
36+
this._instance.sendText(text);
37+
this._instance.show();
38+
}
3539

3640
dispose() {
3741
if (this._instance) {

0 commit comments

Comments
 (0)