Module:Unicode data: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
m (1 revision imported) |
(Split noncharacter per request) |
||
Line 126: | Line 126: | ||
--]] |
--]] |
||
⚫ | |||
⚫ | |||
⚫ | |||
-- U+FDD0-U+FDEF and all code points ending in FFFE or FFFF are Unassigned |
-- U+FDD0-U+FDEF and all code points ending in FFFE or FFFF are Unassigned |
||
-- (Cn) and specifically noncharacters: |
-- (Cn) and specifically noncharacters: |
||
-- https://www.unicode.org/faq/private_use.html#nonchar4 |
-- https://www.unicode.org/faq/private_use.html#nonchar4 |
||
return 0xFDD0 <= codepoint and (codepoint <= 0xFDEF |
|||
or floor(codepoint % 0x10000) >= 0xFFFE) |
or floor(codepoint % 0x10000) >= 0xFFFE) |
||
end |
|||
⚫ | |||
function p.lookup_name(codepoint) |
|||
if p.is_noncharacter(codepoint) then |
|||
return ("<noncharacter-%04X>"):format(codepoint) |
return ("<noncharacter-%04X>"):format(codepoint) |
||
end |
end |