#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# type = Utf8Validator . UTF8VALIDATOR_DFA [ b ] #NEWLINE# if ( self . state != Utf8Validator . UTF8_ACCEPT ) : #NEWLINE# #INDENT# self . codepoint = ( ( b & 63 ) | ( self . codepoint << 6 ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . codepoint = ( ( 255 >> type ) & b ) #NEWLINE# #UNINDENT# self . state = Utf8Validator . UTF8VALIDATOR_DFA [ ( ( 256 + ( type . state * 16 ) ) + type ) ] #NEWLINE# return self . state