|XP is just a number|
Why won't Perl convert (Latin1 | ISO-8859-1) to (UTF-8 | utf8)?by taint (Chaplain)
|on Jun 05, 2013 at 16:29 UTC||Need Help??|
taint has asked for the
wisdom of the Perl Monks concerning the following question:
I've been struggling for some time attempting to convert ISO-8859-1 web pages (html files) to utf8 encoded html files.
I've tried iconv(1), which failed. So I tried piconv(1), which also failed
It's not that either can't accomplish the task -- it's that they refuse to perform the task.
Example; I have some ~1,000 .html files I want to convert from Latin1 => utf8:
The resulting files remain ISO-8859-1. This time with piconv(1):
Again, the resultant files remain ISO-8859-1 (Latin1).
All of these files contain the following line within the <head> tags:
Strangley, if I change that line to:
The resultant file will be utf8 encoded.
Is this a bug in Perl?
Any, and all help with this greatly appreciated.
Thank you for all your time, and consideration.
#!/usr/bin/perl -Tw use perl::always; my $perl_version = "5.12.4"; print $perl_version;