From dd18f22140b3d8a0a8491105f052df99273dab99 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 15 Jan 2026 00:57:06 +0800 Subject: add io.convert --- xmake/modules/cli/iconv.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'xmake/modules/cli/iconv.lua') diff --git a/xmake/modules/cli/iconv.lua b/xmake/modules/cli/iconv.lua index cba86b500..efb26c864 100644 --- a/xmake/modules/cli/iconv.lua +++ b/xmake/modules/cli/iconv.lua @@ -47,7 +47,6 @@ function main(...) local from_code = args.from local to_code = args.to - -- read and write content - local content = io.readfile(input_file, {encoding = from_code}) - io.writefile(output_file, content, {encoding = to_code}) + -- convert encoding + io.convert(input_file, output_file, {from = from_code, to = to_code}) end -- cgit v1.3.1