Merge Upstream (luautf8 benötigt!!!)
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
|
||||
local utilities = {}
|
||||
|
||||
utf8 = require 'lua-utf8'
|
||||
ltn12 = require('ltn12')
|
||||
http = require('socket.http')
|
||||
https = require('ssl.https')
|
||||
@ -1097,4 +1098,10 @@ function is_channel_disabled(msg)
|
||||
return disabled
|
||||
end
|
||||
|
||||
-- Converts a gross string back into proper UTF-8.
|
||||
-- Useful for fixing improper encoding caused by bad JSON escaping.
|
||||
function utilities.fix_utf8(str)
|
||||
return string.char(utf8.codepoint(str, 1, -1))
|
||||
end
|
||||
|
||||
return utilities
|
Reference in New Issue
Block a user