From ef6d972e0616adf11829609bc9392235508300e9 Mon Sep 17 00:00:00 2001 From: Chr_ Date: Tue, 20 Apr 2021 00:23:23 +0800 Subject: [PATCH] fix #875 change code page to match the variable "codepage", and fix #875 --- src/common/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/util.ts b/src/common/util.ts index 4445d0de..d3f05ca5 100644 --- a/src/common/util.ts +++ b/src/common/util.ts @@ -208,7 +208,7 @@ export function spawn( let codepage = "65001"; if (os.platform() === "win32") { try { - const chcp = child_process.execSync("chcp.com"); + const chcp = child_process.execSync(`chcp.com ${codepage}`); codepage = chcp.toString().split(":").pop().trim(); } catch (error) { arduinoChannel.warning(`Defaulting to code page 850 because chcp.com failed.\