Jump to content

Module:DecodeEncode and Module:DecodeEncode/sandbox: Difference between pages

(Difference between pages)
Content deleted Content added
Fixed error (`a ~= (nil or '')` doesn't work; change to `a and a ~= ''`).
 
simplify code
 
Line 51: Line 51:
local ret
local ret


if charset and charset ~= '' then
if charset ~= '' then
ret = mw.text.encode( s, charset )
ret = mw.text.encode( s, charset )
else
else