From 374292d175c0dcea8b24fc0dc4c0636e9cc85afa Mon Sep 17 00:00:00 2001 From: zg0 Date: Tue, 18 Oct 2022 04:16:23 +0300 Subject: skip utf-8 bom. (#110) --- src/yuescript/yuescript.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/yuescript/yuescript.h b/src/yuescript/yuescript.h index 2d2d660..a327387 100644 --- a/src/yuescript/yuescript.h +++ b/src/yuescript/yuescript.h @@ -40,6 +40,7 @@ yue.read_file = function(fname) end local text = assert(file:read("*a")) file:close() + if string.sub(text, 1, 3) == "\239\187\191" then text = string.sub(text, 4) end return text end local function get_options(...) -- cgit v1.2.3-55-g6feb