>>> import chardet >>> s='あいう' >>> a=chardet.detect(s) >>> type(a) <type 'dict'> >>> a['confidence'] 0.87624999999999997 >>> a['encoding'] 'utf-8'
>>> import chardet >>> s='あいう' >>> a=chardet.detect(s) >>> type(a) <type 'dict'> >>> a['confidence'] 0.87624999999999997 >>> a['encoding'] 'utf-8'