Module:Unicode data: Difference between revisions

is_Latin(): when returning false as the first return value, also return character position of first non-Latn character as second return value; for use in {{lang}}, {{langx}}, {{transliteration}} error messaging;
Editor1 (talk | contribs)
m 1 revision imported
 
(2 intermediate revisions by 2 users not shown)
Line 549: Line 549:
local codepoint = get_codepoint(frame.args, 2)
local codepoint = get_codepoint(frame.args, 2)
return (func(codepoint)) -- Adjust to one result.
return (func(codepoint)) -- Adjust to one result.
end
end
function p.lookup_kCantonese(codepoint)
local data = loader[('Unihan/kCantonese/%02X'):format(floor(codepoint / 0x1000))]
if data then
return data[codepoint]
end
end
end
end


return p
return p