I have a large set of nested directories containing PHP, HTML, and Javascript files that should all be encoded as UTF-8. However, someone edited several of the files an
This would be a bit of a hack, but since it's a one-off occurrence then it might be worth it. iconv will complain about invalid encoding if it can't read the file using the encoding you give it. Therefore, you could write a wrapper script to iterate over all the files, attempting to convert them from UTF-8 to something else, and those that can't be converted have invalid UTF-8.