diff options
| author | ruki <[email protected]> | 2026-01-20 23:24:58 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-01-20 23:24:58 +0800 |
| commit | f8ab0100d040c5b96f52062caa9b912fe08cc9b6 (patch) | |
| tree | 1f6f3d054d1958849713951b5323cb16c4ca7b98 /xmake/core/base/utf8.lua | |
| parent | e0f8104c1a0e0e62a4c5f02fa7457f308b27e5dd (diff) | |
modify comments
Diffstat (limited to 'xmake/core/base/utf8.lua')
| -rw-r--r-- | xmake/core/base/utf8.lua | 10 |
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 |
