#NEWLINE# def symbol_decode( input , errors = 'strict' ) : #NEWLINE# #INDENT# chars = [ ] #NEWLINE# for ( i , c ) in enumerate ( input ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# chars . append ( decodeTable [ ord ( c ) ] ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# if ( errors == 'replace' ) : #NEWLINE# #INDENT# chars . append ( ord ( '?' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise UnicodeDecodeError ( 'symbol' , input , i , ( i + 1 ) , ERROR_STRING ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return ( '' . join ( map ( unichr , chars ) ) , len ( input ) )