I have a large number of files that are either in Windows encoding (CP-1252) or UTF-8 without BOM.
Since those cause problems in my application, I'd like to convert them to UTF-8 with BOM. I did this in Notepad++ for a number of files, but I just found out I have to process ~600 more files, which sounds just like a task for being automated.
The tool must
- be gratis
- work on Windows (7 SP1 x64)
- find files by standard DOS pattern (e.g.
- find files recursively (like a
/rswitch on command line)
- write back to the input file, not to a new file (no worries: it's under version control)
- detect if a BOM is already present and ignore those files
- distinguish CP-1252 from UTF-8, which isn't an easy task
I don't care
- whether it's a GUI or command line tool
- it can process other encodings as well, e.g. via command line switch