Determine File Encoding
I ran into a problem where I wasn’t sure if I could trust the encoding that my text editor was displaying. I also wanted to check the encoding on about 10,000 files and determine if it was not a specific encoding. So, I created a little program to tell me the encoding of a file. This in combination with powershell allowed me to loop recursively through all the files in a directory and create a list of the files that were not the correct encoding.
A Good portion of the code that I used for this application was available on the another site that describes how to determine the Encoding of a Unicode file.
The application can be downloaded below:

September 8th, 2008 at 5:25 am
Hello,
What exactly this exe should do? I'm looking for exactly the same kind of program, but I didn't notice anything, when I ran your program.
I'd appreciate, if you could give me more advice…
February 19th, 2009 at 6:22 pm
It is a command line program. To run it you open up dos by going to start→run and type cmd.
Then you run the program by giving it a file to process.
c:\path\to\FileType.exe c:\path\to\myfile.txt
May 15th, 2009 at 4:49 am
Hi.
Been looking for something like this but was wondering. No matter what the encoding is it only seems to return:
C:\Temp\Perl>FileType.exe expected_chinese.txt
1252: Western European (Windows)
I was expecting UTF-8.
David.
December 12th, 2011 at 7:58 am
Same results as David above. Lame…