diff options
| author | ruki <[email protected]> | 2018-08-30 21:02:14 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-08-30 00:13:27 +0800 |
| commit | fa751b550a8363c6d7afc57891f9b4e0fa7ab826 (patch) | |
| tree | 09c8ca320506d899d8e0e5af6c402e1ef6bc59f7 /xmake/plugins/project/vstudio/impl/vs201x_solution.lua | |
| parent | 066348679895a8812f83369f55bea777714b5a3d (diff) | |
add string.convert
Diffstat (limited to 'xmake/plugins/project/vstudio/impl/vs201x_solution.lua')
| -rw-r--r-- | xmake/plugins/project/vstudio/impl/vs201x_solution.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs201x_solution.lua b/xmake/plugins/project/vstudio/impl/vs201x_solution.lua index ddc34a8c6..b2c9e7705 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x_solution.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x_solution.lua @@ -103,7 +103,8 @@ function make(vsinfo) vsinfo.solution_name = project.name() or "vs" .. vsinfo.vstudio_version -- open solution file - local slnfile = vsfile.open(path.join(vsinfo.solution_dir, vsinfo.solution_name .. ".sln"), "w") + local slnpath = path.join(vsinfo.solution_dir, vsinfo.solution_name .. ".sln") + local slnfile = vsfile.open(slnpath, "w") -- init indent character vsfile.indentchar('\t') @@ -119,4 +120,7 @@ function make(vsinfo) -- exit solution file slnfile:close() + + -- convert gb2312 to utf8 + io.writefile(slnpath, io.readfile(slnpath):convert("gb2312", "utf8")) end |
