We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents deca366 + 1e33ea4 commit 89973b3Copy full SHA for 89973b3
lib/dtutils/system.lua
@@ -87,7 +87,13 @@ function dtutils_system.windows_command(command)
87
if file then
88
dt.print_log("opened file")
89
command = string.gsub(command, "%%", "%%%%") -- escape % from windows shell
90
- file:write(command)
+ file:write("@echo off\n")
91
+ file:write('for /f "tokens=2 delims=:." %%x in (\'chcp\') do set cp=%%x\n')
92
+ file:write("chcp 65001>nul\n") -- change the encoding of the terminal to handle non-english characters in path
93
+ file:write("\n")
94
+ file:write(command .. "\n")
95
96
+ file:write("chcp %%cp%%>nul\n")
97
file:close()
98
99
result = dt.control.execute(fname)
0 commit comments