When I extract data from a MySQL database, some of the output have special characters,
when opened in e.g. emacs it decodes to \240 and \346.
When shown in an UTF-8 terminal, the special characters is shown as �
So the used encoding seams to only use 1 byte per character.
I can e.g. see that \346 should be æ.
Question
Does Perl have a module that can encode these special characters to UTF-8?
Use
Encode::decodeto decode your data from whatever encoding it’s in to Perl’s internal format.Then, when writing the data out to a file, set the
'utf8'layer to make the data be written in UTF-8.