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 small 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.
Must of the code that I used in this little application was taken from the following site:
http://www.personalmicrocosms.com/Pages/dotnettips.aspx?c=15&t=17#tip

(No Ratings Yet)