ruantiblock-mod-lua: added lua-idn. luci-app-ruantiblock: updated log.

This commit is contained in:
gSpot
2025-09-04 18:29:31 +03:00
parent 1c27840aca
commit 493cc103b8
13 changed files with 547 additions and 204 deletions
@@ -309,7 +309,7 @@ function BlackListParser:convert_encoding(input)
if self.ICONV_TYPE == "lua" and self.iconv_handler then
output = self.iconv_handler:iconv(input)
elseif self.ICONV_TYPE == "standalone" and self.ICONV_CMD then
local iconv_handler = assert(io.popen('printf \'' .. input .. '\' | ' .. self.ICONV_CMD .. ' -f "' .. self.site_encoding .. '" -t "' .. self.encoding .. '"', 'r'))
local iconv_handler = assert(io.popen('printf \'%s\' \'' .. input .. '\' | ' .. self.ICONV_CMD .. ' -f "' .. self.site_encoding .. '" -t "' .. self.encoding .. '"', 'r'))
output = iconv_handler:read("*a")
iconv_handler:close()
end