Module:DecodeEncode: Difference between revisions

imported>MSGJ
changes by DePiep and Gonnym
Fixed error (`a ~= (nil or '')` doesn't work; change to `a and a ~= ''`).
Line 51: Line 51:
local ret
local ret


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