မဝ်ဂျူ:Unicode data: အရာမတၞဟ်ခြာ အကြာ မူတၞဟ်ဂမၠိုင်
Content deleted Content added
ဒစင်ဂမၠိုင်: ဟွံပ မကလေၚ်ပလေဝ်ဒါန်လဝ် |
No edit summary ဒစင်ဂမၠိုင်: လက်ဖြင့် နောက်ပြန်ပြင်ခြင်း မကလေၚ်ပလေဝ်ဒါန်လဝ် |
||
လာင် ၁-
local m_str_utils = require("Module:string utilities")
local cp = m_str_utils.codepoint
local gcodepoint = m_str_utils.gcodepoint
local gsub = m_str_utils.gsub
local u = m_str_utils.char
local export = {}
local udata = mw.loadData("Module:Unicode data/data")
local floor = math.floor
Line ၈၈ ⟶ ၉၆:
return ("TANGUT COMPONENT-%03d"):format(codepoint - 0x187FF)
end },
{ 0x18D00, 0x18D08, "TANGUT IDEOGRAPH-%04X" }, -- Tangut▼
{ 0x18B00, 0x18CD5, "KHITAN SMALL SCRIPT CHARACTER-%04X" },
{
{ 0x20000, 0x2A6DF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension B
{ 0x2A700,
{
{ 0x2B820, 0x2CEA1, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension E
{ 0x2CEB0, 0x2EBE0, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension F
{ 0x2EBF0, 0x2EE5D, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension I
-- CJK Compatibility Ideographs Supplement (Supplementary Ideographic Plane)
{ 0x2F800, 0x2FA1D, "CJK COMPATIBILITY IDEOGRAPH-%04X" },
{ 0x30000, 0x3134A, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension G
{ 0x31350, 0x323AF, "CJK UNIFIED IDEOGRAPH-%04X" }, -- CJK Ideograph Extension H
{ 0xE0100, 0xE01EF, function (codepoint) -- Variation Selectors Supplement
return ("VARIATION SELECTOR-%d"):format(codepoint - 0xE0100 + 17)
Line ၁၀၆ ⟶ ၁၁၆:
}
name_hooks.length = #name_hooks
--[[ Add another - in this line to test the code point ordering in name_hooks.
local function print_it(a, b, c)
if type(c) == "string" then
mw.log(c:format(a), c:format(b))
else
mw.log(c(a), c(b))
end
end
while true do
local first, second = name_hooks[i], name_hooks[i + 1]
if not (first and second) then break end
local message
if not (first[1] < first[2] and first[2] < second[1] and second[1] < second[2]) then
message = "Bad name label ordering at index " .. i .. ":"
elseif second[1] == first[2] + 1 and second[3] == first[3] then
message = "Name hooks can be merged at index " .. i .. ":"
end
if message then
mw.log(message)
print_it(unpack(first))
print_it(unpack(second))
end
i = i + 1
end
--]]
local name_range_cache
Line ၁၇၂ ⟶ ၂၀၈:
end
end
▲local planes = {
-- Load [[Module:Unicode data/blocks]] if needed and assign it to this variable.
Line ၂၁၇ ⟶ ၂၄၃:
function export.lookup_plane(codepoint)
local i = floor(codepoint / 0x10000)
return udata.planes[i] or ("Plane %u"):format(i)
end
Line ၂၄၁ ⟶ ၂၆၇:
local has_nonws = false
for
if (
or (
or (
or (
or (
or (
or (
or ((
or (
then
return false
end
local printable, result = export.is_printable(
if not printable then
return false
Line ၃၆၂ ⟶ ၃၈၈:
function export.add_dotted_circle(str)
return (
function(char)
if export.is_combining(
return '◌' .. char
end
Line ၄၀၅ ⟶ ၄၃၁:
end,
"Zzzz")
function export.get_entry_title(codepoint)
if udata.unsupported_title[codepoint] then
return udata.unsupported_title[codepoint]
end
if lookup_control(codepoint) ~= "assigned" then
return nil
end
return
end
|