Changing character sets for ALL files in a directory to UTF-8
Posted on 2007-08-01
I have over 300 script files in a directory that were created using a mixture of the following character sets:
This causes a number of problems.
For example, when displayed as a webpage, the header could be created with one charset, the body with another and the footer with another.
So I need to convert the contents of ALL files with the extension .pl or .cgi or .php or .txt or .tpl to UTF-8.
How can this be done with PERL?