Russian letters in MTA server console:
function fixconsole(str)
local fix_str = ""
local fix_len = string.len(str)
local ascii_byte
for i=1, fix_len, 1 do
ascii_byte = string.byte(str,i)
if (ascii_byte == 0xA8) then ascii_byte = 0xF0
elseif (ascii_byte == 0xB8) then ascii_byte = 0xF1
elseif (ascii_byte > 0xBF and ascii_byte < 0xF0) then ascii_byte = ascii_byte - 0x40
elseif (ascii_byte > 0xEF and ascii_byte < 0x100) then ascii_byte = ascii_byte - 0x10 end
fix_str = string.format("%s%s",fix_str,string.char(ascii_byte))
end
return fix_str
end
returns fixed string.