Possible Duplicate:
How can I detect the encoding/codepage of a text file
I have to read a (text) .txt file.But I don’t know its encoding type.The encoding type may be
Encoding.ANSI
or
Encoding.Unicode
So my question is ‘How can we know and read that a specific file is of particular encoding type?’
try this
Check this answer it might help you : http://www.eggheadcafe.com/community/aspnet/2/10077748/get-file-encoding.aspx
have look to this also : Encoding Methods