Module:Windows-1255/data

-- the Unicode codepoints corresponding to Windows-1255 codepoints 80 through FF: local codepoints = { 0x20AC, nil,   0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, -- 80 to 87 nil,   0x2030, nil,    0x2039, nil,    nil,    nil,    nil,    -- 88 to 8F nil,   0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, -- 90 to 97 0x02DC, 0x2122, nil,   0x203A, nil,    nil,    nil,    nil,    -- 98 to 9F 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AA, 0x00A5, 0x00A6, 0x00A7, -- A0 to A7	0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, -- A8 to AF	0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, -- B0 to B7	0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, -- B8 to BF	0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7, -- C0 to C7	0x05B8, 0x05B9, nil,   0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF, -- C8 to CF	0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05F0, 0x05F1, 0x05F2, 0x05F3, -- D0 to D7	0x05F4, nil,    nil,    nil,    nil,    nil,    nil,    nil,    -- D8 to DF	0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, -- E0 to E7	0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF, -- E8 to EF	0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, -- F0 to F7	0x05E8, 0x05E9, 0x05EA, nil,    nil,    0x200E, 0x200F, nil     -- F8 to FF }

local to_windows_1255 = {} for i = 0, 127 do	to_windows_1255[string.char(i)] = string.char(i) end for i = 128, 255 do	if codepoints[i-127] then to_windows_1255[mw.ustring.char(codepoints[i-127])] = string.char(i) end end

return { to_windows_1255 = to_windows_1255 }