From c24dfade5ecc2627bd5faa69044cc346053062b0 Mon Sep 17 00:00:00 2001 From: luboslenco Date: Fri, 25 Oct 2024 17:02:42 +0200 Subject: [PATCH] Make fs_writefile output utf8 --- tools/make.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/make.js b/tools/make.js index 0055274e..ec42b79d 100644 --- a/tools/make.js +++ b/tools/make.js @@ -80,12 +80,8 @@ function fs_readfile(p) { } function fs_writefile(p, data) { - let u8 = new Uint8Array(data.length); - for (let i = 0; i < data.length; ++i) { - u8[i] = data.charCodeAt(i); - } let f = std.open(p, "w"); - f.write(u8.buffer, 0, u8.length); + f.puts(data); // utf8 f.close(); }