local data = {}
local U = require("Module:string/char")
local nuktA = U(0x11173)
local consonants = "𑅕𑅖𑅗𑅘𑅙𑅚𑅛𑅜𑅝𑅞𑅟𑅠𑅡𑅢𑅣𑅤𑅥𑅦𑅧𑅨𑅩𑅪𑅫𑅬𑅭𑅮𑅯𑅰𑅱𑅲"
local consonant = "" .. nuktA .. "?"
local acute = U(0x301) -- combining acute
data = {
-- Vowels and modifiers. Do the diphthongs and diaereses first.
{"ai", "𑅑"},
{"au", "𑅒"},
{"ä", "𑅐"},
{"ö", "𑅔"},
{"ï", "𑅑"},
{"ü", "𑅒"},
{"a", "𑅐"},
{"ā", "𑅐"},
{"i", "𑅑"},
{"ī", "𑅑"},
{"u", "𑅒"},
{"ū", "𑅒"},
{"e", "𑅓"},
{"o", "𑅔"},
{"(𑅐)()", "%1%2"}, -- a-i, a-u for 𑅐𑅑, 𑅐𑅒; must follow rules for "ai", "au"
-- Two-letter consonants must go before h.
{"kh", "𑅖"},
{"gh", "𑅘"},
{"ch", "𑅚"},
{"jh", "𑅜"},
{"ṭh", "𑅟"},
{"ḍh", "𑅡"},
{"th", "𑅤"},
{"dh", "𑅦"},
{"ph", "𑅩"},
{"bh", "𑅫"},
{"h", "𑅱"},
-- Other stops.
{"k", "𑅕"},
{"g", "𑅗"},
{"c", "𑅙"},
{"j", "𑅛"},
{"ṭ", "𑅞"},
{"ḍ", "𑅠"},
{"ṛ", "𑅲"},
{"t", "𑅣"},
{"d", "𑅥"},
{"p", "𑅨"},
{"b", "𑅪"},
-- Nasals.
{"ñ", "𑅝"},
{"ṇ", "𑅢"},
{"n", "𑅧"},
{"n", "𑅧"},
{"m", "𑅬"},
-- Remaining consonants.
{"y", "𑅛"},
{"r", "𑅭"},
{"l", "𑅮"},
{"v", "𑅯"},
{"ś", "𑅰"},
{"s", "𑅰"},
{"ṣ", "𑅖"},
{"ṃ", "𑅧"},
}
-- This must go last, after independent vowels are converted to diacritics, or "aï", "aü" won't work.
table.insert(data, {"(" .. consonant .. ")𑅐", "%1"})
-- ] to ]
data = {
= {
= "ā",
= "ī",
= "ū",
= "ñ",
= "ṭ",
= "ḍ",
= "ṇ",
= "ś",
= "ṣ",
= "ṃ",
= acute,
},
= {
= "ṛ",
},
}
return data