libs/encodings.lua

1
local mime = require "mime";
2
 
3
module "encodings"
4
 
5
idna = {};
6
stringprep = {};
7
base64 = { encode = mime.b64, decode = mime.unb64 };
8
utf8 = {
9
	valid = (utf8 and utf8.len) and function (s) return not not utf8.len(s); end or function () return true; end;
10
};
11
 
12
return _M;