Module:Grk-mar-entryname

local export = {} local u = mw.ustring.char

local remove_diacritics = u(0x030C) .. u(0x0324) .. u(0x032E) -- caron, diaeresis below, breve below

function export.makeEntryName(text, lang, sc) text = mw.ustring.toNFD(text) -- decompose if sc == "Cyrl" then -- if script is Cyrillic, remove acute accents text = mw.ustring.gsub(text, "[" .. u(0x0301) .. "]", "") end return mw.ustring.toNFC(mw.ustring.gsub(text, "[" .. remove_diacritics .. "]", "")) -- remove appropriate diacritics, then recompose again end

return export