Module:Unicode data/scripts/sandbox explained

--[=[ -- Official Unicode script values for individual codepoints and ranges of -- codepoints. -- https://www.unicode.org/Public/UNIDATA/Scripts.txt provided -- the script names, and https://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt -- provided script codes corresponding to the names (see [[Script (Unicode)]]).--]=]

local data =

-- Required for binary search function in .-- Cannot get length of module loaded with mw.loadData.data.ranges.length = #data.ranges

data.rtl =

for _, script in ipairs(mw.loadData "Module:Lang/data".rtl_scripts) do -- has script codes in lowercase; -- this module has script codes with the first letter capitalized. data.rtl[script:gsub("^%a", string.upper)] = trueend

return data