summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2026-02-02 23:20:58 +0800
committerruki <[email protected]>2026-02-02 23:20:58 +0800
commit84ecebb4e9beaef3d046617c9c5ae3c1714a4aa8 (patch)
treebcba8c9b53f8c41109461c1ea5aaac39960e63ea
parenta0249772f8e2960a741e6f51719605963d81032e (diff)
add utf8.bom
-rw-r--r--xmake/core/base/utf8.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/core/base/utf8.lua b/xmake/core/base/utf8.lua
index 67b52e7ec..a35469849 100644
--- a/xmake/core/base/utf8.lua
+++ b/xmake/core/base/utf8.lua
@@ -37,6 +37,11 @@ local utf8 = utf8 or {}
-- @interface utf8.byte(s [, i [, j]])
--
+-- the utf8 bom
+if not utf8.bom then
+ utf8.bom = "\239\187\191"
+end
+
-- the char pattern
if not utf8.charpattern then
utf8.charpattern = "[\0-\x7F\xC2-\xFD][\x80-\xBF]*"