windows codepage problem aproach to a fix

This commit is contained in:
Sebastian Hildebrandt 2020-10-06 16:29:43 +02:00
parent e062ace283
commit 31f9742f46

View File

@ -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) {