summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2021-01-13 23:07:49 +0800
committerruki <[email protected]>2021-01-13 23:07:49 +0800
commit3bbc5074add71d4f5d864f6cfe02abb6646ac4ac (patch)
treea85a9aa2b03e63713d132edd50e5711b12bcc03b /xmake/modules
parentbe039661f2607b4055ded52a626ce904fc854565 (diff)
improve find_vstudio
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/detect/sdks/find_vstudio.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/modules/detect/sdks/find_vstudio.lua b/xmake/modules/detect/sdks/find_vstudio.lua
index f833f304d..d908bcc5a 100644
--- a/xmake/modules/detect/sdks/find_vstudio.lua
+++ b/xmake/modules/detect/sdks/find_vstudio.lua
@@ -45,6 +45,9 @@ function _load_vcvarsall(vcvarsall, vsver, arch, opt)
local genvcvars_bat = os.tmpfile() .. "_genvcvars.bat"
local file = io.open(genvcvars_bat, "w")
file:print("@echo off")
+ -- @note we need get utf8 output from cmd.exe
+ -- because some %PATH% and other envs maybe contains unicode characters
+ file:print("chcp 65001")
-- fix error caused by the new vsDevCmd.bat of vs2019
-- @see https://github.com/xmake-io/xmake/issues/549
if vsver and tonumber(vsver) >= 16 then