in reply to question about Encode::decode('iso-8859-1', ...)

Yes. If $x is a string with any non-latin1 character ("ς", for instance)... then test() will croak 'wide char something something'...
[]s, HTH, Massa (κς,πμ,πλ)