summaryrefslogtreecommitdiff
path: root/xmake/core/base/utf8.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2026-01-20 23:24:58 +0800
committerruki <[email protected]>2026-01-20 23:24:58 +0800
commitf8ab0100d040c5b96f52062caa9b912fe08cc9b6 (patch)
tree1f6f3d054d1958849713951b5323cb16c4ca7b98 /xmake/core/base/utf8.lua
parente0f8104c1a0e0e62a4c5f02fa7457f308b27e5dd (diff)
modify comments
Diffstat (limited to 'xmake/core/base/utf8.lua')
-rw-r--r--xmake/core/base/utf8.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/xmake/core/base/utf8.lua b/xmake/core/base/utf8.lua
index d855b5fde..1a1edc0ea 100644
--- a/xmake/core/base/utf8.lua
+++ b/xmake/core/base/utf8.lua
@@ -16,6 +16,10 @@
--
-- @author ruki
-- @file utf8.lua
+
+-- define module: utf8
+local utf8 = utf8 or {}
+
-- @desc The utf8 module
-- It provides basic support for UTF-8 encoding.
-- It is compatible with Lua 5.3+ utf8 library.
@@ -27,8 +31,10 @@
-- @interface utf8.codes(s [, lax])
--
--- define module: utf8
-local utf8 = utf8 or {}
+-- the char pattern
+if not utf8.charpattern then
+ utf8.charpattern = "[\0-\x7F\xC2-\xFD][\x80-\xBF]*"
+end
-- return module: utf8
return utf8