1
0
mirror of https://github.com/lxsang/antd-lua-plugin synced 2024-12-27 09:58:21 +01:00

fix utf8 pb

This commit is contained in:
lxsang 2020-01-11 23:50:01 +01:00
parent ac99eedc71
commit 9844bdebd6

View File

@ -38,14 +38,14 @@ function std.cjson(ck)
for k,v in pairs(ck) do for k,v in pairs(ck) do
std.setCookie(k.."="..v.."; Path=/") std.setCookie(k.."="..v.."; Path=/")
end end
std.header("Content-Type","application/json") std.header("Content-Type","application/json; charset=utf-8")
std.header_flush() std.header_flush()
end end
function std.chtml(ck) function std.chtml(ck)
for k,v in pairs(ck) do for k,v in pairs(ck) do
std.setCookie(k.."="..v.."; Path=/") std.setCookie(k.."="..v.."; Path=/")
end end
std.header("Content-Type","text/html") std.header("Content-Type","text/html; charset=utf-8")
std.header_flush() std.header_flush()
end end
function std.t(s) function std.t(s)
@ -83,16 +83,16 @@ end
end ]] end ]]
function std.html() function std.html()
std.header("Content-Type","text/html") std.header("Content-Type","text/html; charset=utf-8")
std.header_flush() std.header_flush()
end end
function std.text() function std.text()
std.header("Content-Type","text/plain") std.header("Content-Type","text/plain; charset=utf-8")
std.header_flush() std.header_flush()
end end
function std.json() function std.json()
std.header("Content-Type","application/json") std.header("Content-Type","application/json; charset=utf-8")
std.header_flush() std.header_flush()
end end
function std.jpeg() function std.jpeg()