1 -- encoding borrowed from signs_lib fork at https://github.com/lord-server/lord
6 [130] = "\226\128\154",
8 [132] = "\226\128\158",
9 [133] = "\226\128\166",
10 [134] = "\226\128\160",
11 [135] = "\226\128\161",
12 [136] = "\226\130\172",
13 [137] = "\226\128\176",
15 [139] = "\226\128\185",
21 [145] = "\226\128\152",
22 [146] = "\226\128\153",
23 [147] = "\226\128\156",
24 [148] = "\226\128\157",
25 [149] = "\226\128\162",
26 [150] = "\226\128\147",
27 [151] = "\226\128\148",
29 [153] = "\226\132\162",
31 [155] = "\226\128\186",
61 [185] = "\226\132\150",
87 [130] = {[172] = "\136"},
88 [132] = {[150] = "\185", [162] = "\153"},
203 [210] = {[144] = "\165", [145] = "\180"}
211 function AnsiToUtf8(s)
213 for i = 1, s and s:len() or 0 do
216 r = r .. string.char(b)
219 r = r .. "\209" .. string.char(b - 112)
221 r = r .. "\208" .. string.char(b - 48)
222 elseif ansi_decode[b] then
223 r = r .. ansi_decode[b]
232 function Utf8ToAnsi(s)
233 local a, j, r, b = 0, 0, ""
234 for i = 1, s and s:len() or 0 do
240 r = r .. string.char(b)
245 --if j == nil or b == nil then return r end
248 --local ansi = utf8_decode[j]
249 --if ansi == nil then return r end
250 --if ansi[b] == nil then return r end
251 if utf8_decode[j] then
252 if utf8_decode[j][b] then
253 a, r = a - 1, r .. utf8_decode[j][b]
258 elseif b == 194 or b == 208 or b == 209 or b == 210 then