I just published a new article. It is titled "Detecting the Byte Order Mark of a file from a .Net application".
It shows you how to detect the encoding of a text file from your application.
you can read the full article from http://emoreau.com/Entries/Articles/2011/04/Detecting-the-Byte-Order-Mark-of-a-file-from-a-Net-application.aspx