How to find files with given character encoding?

This tool works great. Check it out. It shows all files and their encodings for a folder.

http://encodingchecker.codeplex.com/releases/view/59420

There is also this, for bulk changing files to UTF8.

http://www.rotatingscrew.com/utfcast.aspx


In general this is not possible - apart from the special case of UTF-8 text files with a Byte Order Mark. Since the name of the encoding is not stored in the text file the only way to tell, for example, CP437 from CP850 would be to make a guess based on a statistical analysis of the whole file, looking at frequency of certain character pairs etc.

Solaris users have auto_ef but, so far as I know, there isn't a Windows port.

Perl users have Encode::Guess

According to Wikipedia "The newer versions of the unix File command attempt to do a basic detection of character encoding. (also available on cygwin and mac)"

None of the above will be 100% reliable. If your files are definitely all in one of a handful of known encodings you may be able to do better.