#NEWLINE# def decode( self , b ) : #NEWLINE# #INDENT# '\n                Eat one UTF-8 octet, and validate on the fly.\n\n                Returns ``UTF8_ACCEPT`` when enough octets have been consumed, in which case\n                ``self.codepoint`` contains the decoded Unicode code point.\n\n                Returns ``UTF8_REJECT`` when invalid UTF-8 was encountered.\n\n                Returns some other positive integer when more octets need to be eaten.\n                ' #NEWLINE# tt = UTF8VALIDATOR_DFA_S [ b ] #NEWLINE# if ( self . state != UTF8_ACCEPT ) : #NEWLINE# #INDENT# self . codepoint = ( ( tt & 63 ) | ( self . codepoint << 6 ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . codepoint = ( ( 255 >> tt ) & b ) #NEWLINE# #UNINDENT# self . state = UTF8VALIDATOR_DFA_S [ ( ( 256 + ( self . state * 16 ) ) + tt ) ] #NEWLINE# return self . state