Passion/Python

detect encoding

sunshout 2017. 5. 22. 10:46

import chardet

rawdata = open('xxx.txt','r').read()

chardet.detect(rawdata)


결과

{'confidence':1.0, 'encoding':'UTF-8'}