windows: garbled output because of codepage

This commit is contained in:
Sebastian Hildebrandt 2018-11-18 12:30:01 +01:00
parent 0fa35f740b
commit 052e66e504
2 changed files with 3 additions and 2 deletions

View File

@ -100,6 +100,7 @@ Other changes
| Version | Date | Comment |
| -------------- | -------------- | -------- |
| 3.48.4 | 2018-11-18 | windows: garbled output because of codepage |
| 3.48.3 | 2018-11-18 | `dockerContainerStats()` fixed issue `cpu_percent` win |
| 3.48.2 | 2018-11-18 | `dockerContainerStats()` fixed issue `cpu_percent`, win exec |
| 3.48.1 | 2018-11-17 | `docker...()` fixed issue parsing docker socket JSON |

View File

@ -203,8 +203,8 @@ function execWin(cmd, opts, callback) {
callback = opts;
opts = execOptsWin;
}
newCmd = 'chcp 65001 > nul && cmd /C ' + cmd + ' && chcp ' + codepageWin + ' > nul';
exec(newCmd, util.execOptsWin, function (error, stdout) {
let newCmd = 'chcp 65001 > nul && cmd /C ' + cmd + ' && chcp ' + codepageWin + ' > nul';
exec(newCmd, execOptsWin, function (error, stdout) {
callback(error, stdout)
})
}