diff options
| author | ruki <[email protected]> | 2026-01-15 00:57:06 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-01-15 00:57:06 +0800 |
| commit | dd18f22140b3d8a0a8491105f052df99273dab99 (patch) | |
| tree | f296f2d23ca08531267eaf041b12a23522dff78d /xmake/modules/cli/iconv.lua | |
| parent | 4ecd3eff0b966f7d16cf5d3dc413add12bb19486 (diff) | |
add io.convert
Diffstat (limited to 'xmake/modules/cli/iconv.lua')
| -rw-r--r-- | xmake/modules/cli/iconv.lua | 5 |
1 files changed, 2 insertions, 3 deletions
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 |
