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

(Difference between pages)
Jump to navigation Jump to search
Page 1
Page 2
imported>Lemondoge
Fixed error (`a ~= (nil or '')` doesn't work; change to `a and a ~= ''`).
 
imported>Gonnym
simplify code
 
Line 51: Line 51:
local ret
local ret


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