From 31f9742f464ce517e49354d3a18582ea3874aeb4 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 6 Oct 2020 16:29:43 +0200 Subject: [PATCH] windows codepage problem aproach to a fix --- lib/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util.js b/lib/util.js index 622531d..568625d 100644 --- a/lib/util.js +++ b/lib/util.js @@ -310,7 +310,7 @@ function wmic(command, options) { return new Promise((resolve) => { process.nextTick(() => { try { - exec(getWmic() + ' ' + command, options, function (error, stdout) { + exec(process.env.WINDIR + '\\system32\\chcp.com 65001 | ' + getWmic() + ' ' + command, options, function (error, stdout) { resolve(stdout, error); }).stdin.end(); } catch (e) {