Fetch the Encoding type of a file in C#
Hi,
I was trying to find the encoding type of a file like unicode, utf8, utf8 without BOM, ANSI etc. I was able to find all the encoding type but ANSI(Encoding.Default/Windows- 1252). I am not able to differentiate ANSI and UTF8. Tried different custom class like (Ude, TextFileEncodingDetector etc) which guesses it but not exactly right. Is there any way to do it?