Repository navigation
luautf8 0.3.0
Unicode 17.0.0 data, NFC correctness fixes for NFC_QC=Maybe characters,
and behavior alignment with Lua 5.5.
Highlights
- Unicode 17.0.0:
unidata.his regenerated from UCD 17.0.0. NFC, case
folding, categories, East Asian width and grapheme cluster data are updated. - NFC fixes:
NFC_QC=Maybecharacters whose canonical decomposition can
recompose with the surrounding context (e.g.U+113C5TULU-TIGALARI VOWEL
SIGN AI,U+16121–U+16128GURUNG KHEMA,U+16D68KIRAT RAI) are no longer
decomposed and left unrecomposed.utf8.isnfcandutf8.normalize_nfcnow
use the same scan, andnormalize_nfc's second result always agrees with
isnfc. gmatch/gsubempty matches: aligned with Lua 5.5 on every supported
Lua version. This fixes the spurious empty matches reported in #64.utf8.escape: malformed escapes now raise an error instead of silently
producing NUL bytes or accepting unclosed brackets.gsub:nil/falsereturns from replacement functions/tables now keep
the original text and count substitutions correctly.- LuaLS type definitions (
lua-utf8.d.lua),UD_STATICbuild option, and
MSVC 2026 warning fixes.
Breaking changes
utf8.escapeis stricter: code relying on the old lenient handling of a
trailing%,%x/%uwithout digits, or unclosed%{...}must be updated.utf8.gmatch/utf8.gsubintentionally use Lua 5.5 empty-match semantics
on Lua 5.1–5.4 hosts too. They may differ from the host's
string.gmatch/string.gsubin those edge cases.
Note
0.2.1 was published through LuaRocks only (no GitHub release). It added Lua
5.5 support and fixed several utf8.widthindex / utf8.char edge cases;
those changes are included in 0.3.0.
Full Changelog: 0.2.1...0.3.0