How to read an ANSI encoded file containing special characters
I'm writing a TFS Checkin policy, which checks if our source files containing our file header. My problem is, that our file header contains a special character "©" and unfortunately some of our source files are encoded in ANSI. So if I read these files in the policy, the string looks like this "Copyright � 2009". string content = File.ReadAllText(pendingChange.LocalItem); I tired to change the encoding of the string, but it does not help. So how can I read these files, that I get the correct string "Copyright © 2009"? Thanks for help! Regards Eny Use Encoding.Default : string content = File