I am trying to create a method that can detect the encoding schema of a text file. I know there are many out there, but I know for sure my text file with be either ASCII, UTF-8, or UTF-16. I only need to detect these three. Anyone know a way to do this?
I am trying to create a method that can detect the encoding schema of
Share
Use the StreamReader to identify the encoding.
Example: