Passion/Python
import chardet
rawdata = open('xxx.txt','r').read()
chardet.detect(rawdata)
결과
{'confidence':1.0, 'encoding':'UTF-8'}