summaryrefslogtreecommitdiff
path: root/script/encoder/ansi.lua
blob: 7cb64ec31346e7847a45d083a90dab21f8647ac5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
local platform = require 'bee.platform'
local windows

if platform.OS == 'Windows' then
    windows = require 'bee.windows'
end

local m = {}

function m.toutf8(text)
    if not windows then
        return text
    end
    return windows.a2u(text)
end

function m.fromutf8(text)
    if not windows then
        return text
    end
    return windows.u2a(text)
end

return m