Is there no way to know the encoding of a file? If so,how can I read the file? I want to find some lines in several .xsl files,but the encoding of these files are different(UTF-8 and UTF-16). I found I can not read a UTF-16 file use UTF-8 encoding,vice versa. How can I do with the case? part code: