local utfchar, utfbyte = utf.char, utf.byte local sorters = sorters or { } local definitions = sorters.definitions or { } local replacementoffset = sorters.constants.replacementoffset local variables = interfaces.variables or { } local function whatever(name) local data = io.loaddata(name) if data then local replacements = { } for a, b in string.gmatch(data,".-: ([^, ]+).-# (%S+)") do -- U+4E00: yī # 一 replacements[#replacements+1] = { b, a } end return replacements end end definitions["cn-hanzi"] = { -- orders = { -- } replacements = whatever("kHanyuPinlu.txt"), }