From 7ce304f9ee9946471d4ad11e78ea25149a05483f Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 21 Aug 2019 00:40:56 +0800 Subject: add utf16le encoding when reading outfile --- xmake/modules/private/tools/vstool.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmake/modules/private/tools/vstool.lua b/xmake/modules/private/tools/vstool.lua index 83539d301..05c7a16b6 100644 --- a/xmake/modules/private/tools/vstool.lua +++ b/xmake/modules/private/tools/vstool.lua @@ -43,7 +43,7 @@ function runv(program, argv, opt) if ok ~= 0 then -- read errors - local outdata = os.isfile(outpath) and io.readfile(outpath) or nil + local outdata = os.isfile(outpath) and io.readfile(outpath, {encoding = "utf16le"}) or nil local errdata = os.isfile(errpath) and io.readfile(errpath) or nil local errors = errdata or "" if #errors:trim() == 0 then @@ -92,7 +92,7 @@ function iorunv(program, argv, opt) -- get output and error data outfile:close() - local outdata = os.isfile(outpath) and io.readfile(outpath) or nil + local outdata = os.isfile(outpath) and io.readfile(outpath, {encoding = "utf16le"}) or nil local errdata = os.isfile(errpath) and io.readfile(errpath) or nil -- remove the temporary output and error file -- cgit v1.3.1