local export = {}
local u = mw.ustring.char
local a, b, c = u(0xF000), u(0xF001), u(0xF002)
local oneChar = {
= "г" .. a, = "г" .. b, = "г" .. c, = "е" .. a, = "к" .. b, = "н" .. a, = "у" .. a, = "х" .. a, = "х" .. b
}
local twoChars = {
= "к" .. a, = "к" .. c, = "п" .. a, = "р" .. a, = "т" .. a
}
function export.makeSortKey(text, lang, sc)
text = mw.ustring.lower(text)
for from, to in pairs(twoChars) do
text = mw.ustring.gsub(text, from, to)
end
return mw.ustring.upper(mw.ustring.gsub(text, ".", oneChar))
end
return export