-
Notifications
You must be signed in to change notification settings - Fork 11
/
utf8.lua
26 lines (18 loc) · 12.6 KB
/
utf8.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
-- complete utf8 cases mapping
-- https://github.com/Be1zebub/Small-GLua-Things/blob/master/utf8.lua
-- cyrillic only:
-- https://github.com/Be1zebub/Small-GLua-Things/blob/master/utf8_cyrillic.lua
if utf8 == nil then utf8 = {charpattern = "[%z\x01-\x7F\xC2-\xF4][\x80-\xBF]*"} end
local lc_uc = {["a"]="A",["b"]="B",["c"]="C",["d"]="D",["e"]="E",["f"]="F",["g"]="G",["h"]="H",["i"]="I",["j"]="J",["k"]="K",["l"]="L",["m"]="M",["n"]="N",["o"]="O",["p"]="P",["q"]="Q",["r"]="R",["s"]="S",["t"]="T",["u"]="U",["v"]="V",["w"]="W",["x"]="X",["y"]="Y",["z"]="Z",["µ"]="Μ",["à"]="À",["á"]="Á",["â"]="Â",["ã"]="Ã",["ä"]="Ä",["å"]="Å",["æ"]="Æ",["ç"]="Ç",["è"]="È",["é"]="É",["ê"]="Ê",["ë"]="Ë",["ì"]="Ì",["í"]="Í",["î"]="Î",["ï"]="Ï",["ð"]="Ð",["ñ"]="Ñ",["ò"]="Ò",["ó"]="Ó",["ô"]="Ô",["õ"]="Õ",["ö"]="Ö",["ø"]="Ø",["ù"]="Ù",["ú"]="Ú",["û"]="Û",["ü"]="Ü",["ý"]="Ý",["þ"]="Þ",["ÿ"]="Ÿ",["ā"]="Ā",["ă"]="Ă",["ą"]="Ą",["ć"]="Ć",["ĉ"]="Ĉ",["ċ"]="Ċ",["č"]="Č",["ď"]="Ď",["đ"]="Đ",["ē"]="Ē",["ĕ"]="Ĕ",["ė"]="Ė",["ę"]="Ę",["ě"]="Ě",["ĝ"]="Ĝ",["ğ"]="Ğ",["ġ"]="Ġ",["ģ"]="Ģ",["ĥ"]="Ĥ",["ħ"]="Ħ",["ĩ"]="Ĩ",["ī"]="Ī",["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["ε"]="Ε",["ζ"]="Ζ",["η"]="Η",["θ"]="Θ",["ι"]="Ι",["κ"]="Κ",["λ"]="Λ",["μ"]="Μ",["ν"]="Ν",["ξ"]="Ξ",["ο"]="Ο",["π"]="Π",["ρ"]="Ρ",["ς"]="Σ",["σ"]="Σ",["τ"]="Τ",["υ"]="Υ",["φ"]="Φ",["χ"]="Χ",["ψ"]="Ψ",["ω"]="Ω",["ϊ"]="Ϊ",["ϋ"]="Ϋ",["ό"]="Ό",["ύ"]="Ύ",["ώ"]="Ώ",["ϐ"]="Β",["ϑ"]="Θ",["ϕ"]="Φ",["ϖ"]="Π",["ϙ"]="Ϙ",["ϛ"]="Ϛ",["ϝ"]="Ϝ",["ϟ"]="Ϟ",["ϡ"]="Ϡ",["ϣ"]="Ϣ",["ϥ"]="Ϥ",["ϧ"]="Ϧ",["ϩ"]="Ϩ",["ϫ"]="Ϫ",["ϭ"]="Ϭ",["ϯ"]="Ϯ",["ϰ"]="Κ",["ϱ"]="Ρ",["ϲ"]="Ϲ",["ϵ"]="Ε",["ϸ"]="Ϸ",["ϻ"]="Ϻ",["а"]="А",["б"]="Б",["в"]="В",["г"]="Г",["д"]="Д",["е"]="Е",["ж"]="Ж",["з"]="З",["и"]="И",["й"]="Й",["к"]="К",["л"]="Л",["м"]="М",["н"]="Н",["о"]="О",["п"]="П",["р"]="Р",["с"]="С",["т"]="Т",["у"]="У",["ф"]="Ф",["х"]="Х",["ц"]="Ц",["ч"]="Ч",["ш"]="Ш",["щ"]="Щ",["ъ"]="Ъ",["ы"]="Ы",["ь"]="Ь",["э"]="Э",["ю"]="Ю",["я"]="Я",["ѐ"]="Ѐ",["ё"]="Ё",["ђ"]="Ђ",["ѓ"]="Ѓ",["є"]="Є",["ѕ"]="Ѕ",["і"]="І",["ї"]="Ї",["ј"]="Ј",["љ"]="Љ",["њ"]="Њ",["ћ"]="Ћ",["ќ"]="Ќ",["ѝ"]="Ѝ",["ў"]="Ў",["џ"]="Џ",["ѡ"]="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"]="Ԁ",["ԃ"]="Ԃ",["ԅ"]="Ԅ",["ԇ"]="Ԇ",["ԉ"]="Ԉ",["ԋ"]="Ԋ",["ԍ"]="Ԍ",["ԏ"]="Ԏ",["ԑ"]="Ԑ",["ԓ"]="Ԓ",["ա"]="Ա",["բ"]="Բ",["գ"]="Գ",["դ"]="Դ",["ե"]="Ե",["զ"]="Զ",["է"]="Է",["ը"]="Ը",["թ"]="Թ",["ժ"]="Ժ",["ի"]="Ի",["լ"]="Լ",["խ"]="Խ",["ծ"]="Ծ",["կ"]="Կ",["հ"]="Հ",["ձ"]="Ձ",["ղ"]="Ղ",["ճ"]="Ճ",["մ"]="Մ",["յ"]="Յ",["ն"]="Ն",["շ"]="Շ",["ո"]="Ո",["չ"]="Չ",["պ"]="Պ",["ջ"]="Ջ",["ռ"]="Ռ",["ս"]="Ս",["վ"]="Վ",["տ"]="Տ",["ր"]="Ր",["ց"]="Ց",["ւ"]="Ւ",["փ"]="Փ",["ք"]="Ք",["օ"]="Օ",["ֆ"]="Ֆ",["ᵽ"]="Ᵽ",["ḁ"]="Ḁ",["ḃ"]="Ḃ",["ḅ"]="Ḅ",["ḇ"]="Ḇ",["ḉ"]="Ḉ",["ḋ"]="Ḋ",["ḍ"]="Ḍ",["ḏ"]="Ḏ",["ḑ"]="Ḑ",["ḓ"]="Ḓ",["ḕ"]="Ḕ",["ḗ"]="Ḗ",["ḙ"]="Ḙ",["ḛ"]="Ḛ",["ḝ"]="Ḝ",["ḟ"]="Ḟ",["ḡ"]="Ḡ",["ḣ"]="Ḣ",["ḥ"]="Ḥ",["ḧ"]="Ḧ",["ḩ"]="Ḩ",["ḫ"]="Ḫ",["ḭ"]="Ḭ",["ḯ"]="Ḯ",["ḱ"]="Ḱ",["ḳ"]="Ḳ",["ḵ"]="Ḵ",["ḷ"]="Ḷ",["ḹ"]="Ḹ",["ḻ"]="Ḻ",["ḽ"]="Ḽ",["ḿ"]="Ḿ",["ṁ"]="Ṁ",["ṃ"]="Ṃ",["ṅ"]="Ṅ",["ṇ"]="Ṇ",["ṉ"]="Ṉ",["ṋ"]="Ṋ",["ṍ"]="Ṍ",["ṏ"]="Ṏ",["ṑ"]="Ṑ",["ṓ"]="Ṓ",["ṕ"]="Ṕ",["ṗ"]="Ṗ",["ṙ"]="Ṙ",["ṛ"]="Ṛ",["ṝ"]="Ṝ",["ṟ"]="Ṟ",["ṡ"]="Ṡ",["ṣ"]="Ṣ",["ṥ"]="Ṥ",["ṧ"]="Ṧ",["ṩ"]="Ṩ",["ṫ"]="Ṫ",["ṭ"]="Ṭ",["ṯ"]="Ṯ",["ṱ"]="Ṱ",["ṳ"]="Ṳ",["ṵ"]="Ṵ",["ṷ"]="Ṷ",["ṹ"]="Ṹ",["ṻ"]="Ṻ",["ṽ"]="Ṽ",["ṿ"]="Ṿ",["ẁ"]="Ẁ",["ẃ"]="Ẃ",["ẅ"]="Ẅ",["ẇ"]="Ẇ",["ẉ"]="Ẉ",["ẋ"]="Ẋ",["ẍ"]="Ẍ",["ẏ"]="Ẏ",["ẑ"]="Ẑ",["ẓ"]="Ẓ",["ẕ"]="Ẕ",["ẛ"]="Ṡ",["ạ"]="Ạ",["ả"]="Ả",["ấ"]="Ấ",["ầ"]="Ầ",["ẩ"]="Ẩ",["ẫ"]="Ẫ",["ậ"]="Ậ",["ắ"]="Ắ",["ằ"]="Ằ",["ẳ"]="Ẳ",["ẵ"]="Ẵ",["ặ"]="Ặ",["ẹ"]="Ẹ",["ẻ"]="Ẻ",["ẽ"]="Ẽ",["ế"]="Ế",["ề"]="Ề",["ể"]="Ể",["ễ"]="Ễ",["ệ"]="Ệ",["ỉ"]="Ỉ",["ị"]="Ị",["ọ"]="Ọ",["ỏ"]="Ỏ",["ố"]="Ố",["ồ"]="Ồ",["ổ"]="Ổ",["ỗ"]="Ỗ",["ộ"]="Ộ",["ớ"]="Ớ",["ờ"]="Ờ",["ở"]="Ở",["ỡ"]="Ỡ",["ợ"]="Ợ",["ụ"]="Ụ",["ủ"]="Ủ",["ứ"]="Ứ",["ừ"]="Ừ",["ử"]="Ử",["ữ"]="Ữ",["ự"]="Ự",["ỳ"]="Ỳ",["ỵ"]="Ỵ",["ỷ"]="Ỷ",["ỹ"]="Ỹ",["ἀ"]="Ἀ",["ἁ"]="Ἁ",["ἂ"]="Ἂ",["ἃ"]="Ἃ",["ἄ"]="Ἄ",["ἅ"]="Ἅ",["ἆ"]="Ἆ",["ἇ"]="Ἇ",["ἐ"]="Ἐ",["ἑ"]="Ἑ",["ἒ"]="Ἒ",["ἓ"]="Ἓ",["ἔ"]="Ἔ",["ἕ"]="Ἕ",["ἠ"]="Ἠ",["ἡ"]="Ἡ",["ἢ"]="Ἢ",["ἣ"]="Ἣ",["ἤ"]="Ἤ",["ἥ"]="Ἥ",["ἦ"]="Ἦ",["ἧ"]="Ἧ",["ἰ"]="Ἰ",["ἱ"]="Ἱ",["ἲ"]="Ἲ",["ἳ"]="Ἳ",["ἴ"]="Ἴ",["ἵ"]="Ἵ",["ἶ"]="Ἶ",["ἷ"]="Ἷ",["ὀ"]="Ὀ",["ὁ"]="Ὁ",["ὂ"]="Ὂ",["ὃ"]="Ὃ",["ὄ"]="Ὄ",["ὅ"]="Ὅ",["ὑ"]="Ὑ",["ὓ"]="Ὓ",["ὕ"]="Ὕ",["ὗ"]="Ὗ",["ὠ"]="Ὠ",["ὡ"]="Ὡ",["ὢ"]="Ὢ",["ὣ"]="Ὣ",["ὤ"]="Ὤ",["ὥ"]="Ὥ",["ὦ"]="Ὦ",["ὧ"]="Ὧ",["ὰ"]="Ὰ",["ά"]="Ά",["ὲ"]="Ὲ",["έ"]="Έ",["ὴ"]="Ὴ",["ή"]="Ή",["ὶ"]="Ὶ",["ί"]="Ί",["ὸ"]="Ὸ",["ό"]="Ό",["ὺ"]="Ὺ",["ύ"]="Ύ",["ὼ"]="Ὼ",["ώ"]="Ώ",["ᾀ"]="ᾈ",["ᾁ"]="ᾉ",["ᾂ"]="ᾊ",["ᾃ"]="ᾋ",["ᾄ"]="ᾌ",["ᾅ"]="ᾍ",["ᾆ"]="ᾎ",["ᾇ"]="ᾏ",["ᾐ"]="ᾘ",["ᾑ"]="ᾙ",["ᾒ"]="ᾚ",["ᾓ"]="ᾛ",["ᾔ"]="ᾜ",["ᾕ"]="ᾝ",["ᾖ"]="ᾞ",["ᾗ"]="ᾟ",["ᾠ"]="ᾨ",["ᾡ"]="ᾩ",["ᾢ"]="ᾪ",["ᾣ"]="ᾫ",["ᾤ"]="ᾬ",["ᾥ"]="ᾭ",["ᾦ"]="ᾮ",["ᾧ"]="ᾯ",["ᾰ"]="Ᾰ",["ᾱ"]="Ᾱ",["ᾳ"]="ᾼ",["ι"]="Ι",["ῃ"]="ῌ",["ῐ"]="Ῐ",["ῑ"]="Ῑ",["ῠ"]="Ῠ",["ῡ"]="Ῡ",["ῥ"]="Ῥ",["ῳ"]="ῼ",["ⅎ"]="Ⅎ",["ⅰ"]="Ⅰ",["ⅱ"]="Ⅱ",["ⅲ"]="Ⅲ",["ⅳ"]="Ⅳ",["ⅴ"]="Ⅴ",["ⅵ"]="Ⅵ",["ⅶ"]="Ⅶ",["ⅷ"]="Ⅷ",["ⅸ"]="Ⅸ",["ⅹ"]="Ⅹ",["ⅺ"]="Ⅺ",["ⅻ"]="Ⅻ",["ⅼ"]="Ⅼ",["ⅽ"]="Ⅽ",["ⅾ"]="Ⅾ",["ⅿ"]="Ⅿ",["ↄ"]="Ↄ",["ⓐ"]="Ⓐ",["ⓑ"]="Ⓑ",["ⓒ"]="Ⓒ",["ⓓ"]="Ⓓ",["ⓔ"]="Ⓔ",["ⓕ"]="Ⓕ",["ⓖ"]="Ⓖ",["ⓗ"]="Ⓗ",["ⓘ"]="Ⓘ",["ⓙ"]="Ⓙ",["ⓚ"]="Ⓚ",["ⓛ"]="Ⓛ",["ⓜ"]="Ⓜ",["ⓝ"]="Ⓝ",["ⓞ"]="Ⓞ",["ⓟ"]="Ⓟ",["ⓠ"]="Ⓠ",["ⓡ"]="Ⓡ",["ⓢ"]="Ⓢ",["ⓣ"]="Ⓣ",["ⓤ"]="Ⓤ",["ⓥ"]="Ⓥ",["ⓦ"]="Ⓦ",["ⓧ"]="Ⓧ",["ⓨ"]="Ⓨ",["ⓩ"]="Ⓩ",["ⰰ"]="Ⰰ",["ⰱ"]="Ⰱ",["ⰲ"]="Ⰲ",["ⰳ"]="Ⰳ",["ⰴ"]="Ⰴ",["ⰵ"]="Ⰵ",["ⰶ"]="Ⰶ",["ⰷ"]="Ⰷ",["ⰸ"]="Ⰸ",["ⰹ"]="Ⰹ",["ⰺ"]="Ⰺ",["ⰻ"]="Ⰻ",["ⰼ"]="Ⰼ",["ⰽ"]="Ⰽ",["ⰾ"]="Ⰾ",["ⰿ"]="Ⰿ",["ⱀ"]="Ⱀ",["ⱁ"]="Ⱁ",["ⱂ"]="Ⱂ",["ⱃ"]="Ⱃ",["ⱄ"]="Ⱄ",["ⱅ"]="Ⱅ",["ⱆ"]="Ⱆ",["ⱇ"]="Ⱇ",["ⱈ"]="Ⱈ",["ⱉ"]="Ⱉ",["ⱊ"]="Ⱊ",["ⱋ"]="Ⱋ",["ⱌ"]="Ⱌ",["ⱍ"]="Ⱍ",["ⱎ"]="Ⱎ",["ⱏ"]="Ⱏ",["ⱐ"]="Ⱐ",["ⱑ"]="Ⱑ",["ⱒ"]="Ⱒ",["ⱓ"]="Ⱓ",["ⱔ"]="Ⱔ",["ⱕ"]="Ⱕ",["ⱖ"]="Ⱖ",["ⱗ"]="Ⱗ",["ⱘ"]="Ⱘ",["ⱙ"]="Ⱙ",["ⱚ"]="Ⱚ",["ⱛ"]="Ⱛ",["ⱜ"]="Ⱜ",["ⱝ"]="Ⱝ",["ⱞ"]="Ⱞ",["ⱡ"]="Ⱡ",["ⱥ"]="Ⱥ",["ⱦ"]="Ⱦ",["ⱨ"]="Ⱨ",["ⱪ"]="Ⱪ",["ⱬ"]="Ⱬ",["ⱶ"]="Ⱶ",["ⲁ"]="Ⲁ",["ⲃ"]="Ⲃ",["ⲅ"]="Ⲅ",["ⲇ"]="Ⲇ",["ⲉ"]="Ⲉ",["ⲋ"]="Ⲋ",["ⲍ"]="Ⲍ",["ⲏ"]="Ⲏ",["ⲑ"]="Ⲑ",["ⲓ"]="Ⲓ",["ⲕ"]="Ⲕ",["ⲗ"]="Ⲗ",["ⲙ"]="Ⲙ",["ⲛ"]="Ⲛ",["ⲝ"]="Ⲝ",["ⲟ"]="Ⲟ",["ⲡ"]="Ⲡ",["ⲣ"]="Ⲣ",["ⲥ"]="Ⲥ",["ⲧ"]="Ⲧ",["ⲩ"]="Ⲩ",["ⲫ"]="Ⲫ",["ⲭ"]="Ⲭ",["ⲯ"]="Ⲯ",["ⲱ"]="Ⲱ",["ⲳ"]="Ⲳ",["ⲵ"]="Ⲵ",["ⲷ"]="Ⲷ",["ⲹ"]="Ⲹ",["ⲻ"]="Ⲻ",["ⲽ"]="Ⲽ",["ⲿ"]="Ⲿ",["ⳁ"]="Ⳁ",["ⳃ"]="Ⳃ",["ⳅ"]="Ⳅ",["ⳇ"]="Ⳇ",["ⳉ"]="Ⳉ",["ⳋ"]="Ⳋ",["ⳍ"]="Ⳍ",["ⳏ"]="Ⳏ",["ⳑ"]="Ⳑ",["ⳓ"]="Ⳓ",["ⳕ"]="Ⳕ",["ⳗ"]="Ⳗ",["ⳙ"]="Ⳙ",["ⳛ"]="Ⳛ",["ⳝ"]="Ⳝ",["ⳟ"]="Ⳟ",["ⳡ"]="Ⳡ",["ⳣ"]="Ⳣ",["ⴀ"]="Ⴀ",["ⴁ"]="Ⴁ",["ⴂ"]="Ⴂ",["ⴃ"]="Ⴃ",["ⴄ"]="Ⴄ",["ⴅ"]="Ⴅ",["ⴆ"]="Ⴆ",["ⴇ"]="Ⴇ",["ⴈ"]="Ⴈ",["ⴉ"]="Ⴉ",["ⴊ"]="Ⴊ",["ⴋ"]="Ⴋ",["ⴌ"]="Ⴌ",["ⴍ"]="Ⴍ",["ⴎ"]="Ⴎ",["ⴏ"]="Ⴏ",["ⴐ"]="Ⴐ",["ⴑ"]="Ⴑ",["ⴒ"]="Ⴒ",["ⴓ"]="Ⴓ",["ⴔ"]="Ⴔ",["ⴕ"]="Ⴕ",["ⴖ"]="Ⴖ",["ⴗ"]="Ⴗ",["ⴘ"]="Ⴘ",["ⴙ"]="Ⴙ",["ⴚ"]="Ⴚ",["ⴛ"]="Ⴛ",["ⴜ"]="Ⴜ",["ⴝ"]="Ⴝ",["ⴞ"]="Ⴞ",["ⴟ"]="Ⴟ",["ⴠ"]="Ⴠ",["ⴡ"]="Ⴡ",["ⴢ"]="Ⴢ",["ⴣ"]="Ⴣ",["ⴤ"]="Ⴤ",["ⴥ"]="Ⴥ",["a"]="A",["b"]="B",["c"]="C",["d"]="D",["e"]="E",["f"]="F",["g"]="G",["h"]="H",["i"]="I",["j"]="J",["k"]="K",["l"]="L",["m"]="M",["n"]="N",["o"]="O",["p"]="P",["q"]="Q",["r"]="R",["s"]="S",["t"]="T",["u"]="U",["v"]="V",["w"]="W",["x"]="X",["y"]="Y",["z"]="Z",["𐐨"]="𐐀",["𐐩"]="𐐁",["𐐪"]="𐐂",["𐐫"]="𐐃",["𐐬"]="𐐄",["𐐭"]="𐐅",["𐐮"]="𐐆",["𐐯"]="𐐇",["𐐰"]="𐐈",["𐐱"]="𐐉",["𐐲"]="𐐊",["𐐳"]="𐐋",["𐐴"]="𐐌",["𐐵"]="𐐍",["𐐶"]="𐐎",["𐐷"]="𐐏",["𐐸"]="𐐐",["𐐹"]="𐐑",["𐐺"]="𐐒",["𐐻"]="𐐓",["𐐼"]="𐐔",["𐐽"]="𐐕",["𐐾"]="𐐖",["𐐿"]="𐐗",["𐑀"]="𐐘",["𐑁"]="𐐙",["𐑂"]="𐐚",["𐑃"]="𐐛",["𐑄"]="𐐜",["𐑅"]="𐐝",["𐑆"]="𐐞",["𐑇"]="𐐟",["𐑈"]="𐐠",["𐑉"]="𐐡",["𐑊"]="𐐢",["𐑋"]="𐐣",["𐑌"]="𐐤",["𐑍"]="𐐥",["𐑎"]="𐐦",["𐑏"]="𐐧"}
local uc_lc = {}
for lc, uc in pairs(lc_uc) do uc_lc[uc] = lc end
setmetatable(uc_lc, {__index = function(_, char) return char:lower() end})
setmetatable(lc_uc, {__index = function(_, char) return char:upper() end})
function utf8.lower(s)
return (s:gsub(utf8.charpattern, uc_lc))
end
function utf8.upper(s)
return (s:gsub(utf8.charpattern, lc_uc))
end
--print(utf8.lower("Привет World #123!"), utf8.upper("Hello Мир #321!"))
-- output: "привет world #123!", "HELLO МИР #321!"