in reply to Encoding a hash in perl before saving it as a CSV file
only shows up when you have a string which is already known to contain a utf8 string (i.e. its utf8 flag is on), and you pass that string to Encode::decode(). This is sensible, because if the string is already known to contain utf8 data, "converting" it to utf8 again would be a "mistake".Cannot decode string with wide characters ...
So based on the code snippet you posted, I would conclude that the $self->content thing is returning a utf8 string, and you shouldn't try to decode it -- just make sure that when you print the content to a file handle, the file handle has been set to use the utf8 IO layer -- and one sure way to do that is:
binmode $fh, ":utf8";
|
|---|