Skip to content

Commit 3bae4d1

Browse files
committed
port-msc: force utf8 codepage when executing a application
1 parent 4848c38 commit 3bae4d1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/minitscript/minitscript/ApplicationMethods.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ void ApplicationMethods::registerConstants(MinitScript* minitScript) {
9797
const string ApplicationMethods::execute(const string& command, int* exitCode, string* error) {
9898
string result;
9999
auto _command = command;
100+
#if defined(_MSC_VER)
101+
_command = "chcp 65001 > nul && " + _command
102+
#endif
100103
auto _exitCode = EXIT_FAILURE;
101104
// error stream
102105
string errorFile;

0 commit comments

Comments
 (0)