#NEWLINE# def _auto_detect_fun( self , text ) : #NEWLINE# #INDENT# for enc in ( self . _DEFAULT_ENCODING , 'utf-8' , 'cp1252' ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# text . decode ( enc ) #NEWLINE# #UNINDENT# except UnicodeError : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# return resolve_encoding ( enc )