Module:Syrc-stripdiacritics: Difference between revisions
Jump to navigation
Jump to search
"entry name" as a concept is going away in favor of "strip diacritics" + logical-to-physical |
m 1 revision imported |
(No difference)
| |
Latest revision as of 12:01, 21 April 2026
- This module lacks a documentation subpage. Please create it.
- Useful links: subpage list • links • transclusions • testcases • sandbox
local export = {}
local u = mw.ustring.char
function export.stripDiacritics(text, lang, sc)
-- tilde, macron, dot above, diaeresis, dot below, breve below, tilde below, macron below, superscript aleph, pthaha, zqapha, rbasa, zlama, hbasa, esasa, rwaha, feminine dot, qushshaya
local replacements = {
u(0x303), u(0x304), u(0x307), u(0x308), u(0x323), u(0x32E), u(0x330), u(0x331), u(0x711), "[" .. u(0x730) .. "-" .. u(0x74A) .. "]"
}
for _, replacement in ipairs(replacements) do
text = mw.ustring.gsub(text, replacement, "")
end
return text
end
return export