|Perl Monk, Perl Meditation|
how to check the encoding of a fileby jbrugger (Parson)
|on Apr 10, 2006 at 08:00 UTC||Need Help??|
jbrugger has asked for the
wisdom of the Perl Monks concerning the following question:
I want to check the encoding of a file, since i need to convert all my templates to utf8, but not the ones that are utf8, since they will be double encoded (using iconf)
However, after supersearching i came up with the following possible solution:
This is not returning anything however.
for now, we started to use (opening each file and parsing it in the encoder):
For the rest i did not find any other way of dertermining the encoding of a file, anyone knows what is wrong with File::BOM or does anyone have a better solution?
"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.