def encoding(self):
        """the character encoding of the request, usually only set in POST type requests"""
        encoding = None
        ct = self.get_header('content-type')
        if ct:
            ah = AcceptHeader(ct)
            if ah.media_types:
                encoding = ah.media_types[0][2].get("charset", None)

        return encoding
def encoding ( self ) : encoding = None ct = self . get_header ( 'content-type' ) if ct : ah = AcceptHeader ( ct ) if ah . media_types : encoding = ah . media_types [ 0 ] [ 2 ] . get ( "charset" , None ) return encoding
the character encoding of the request, usually only set in POST type requests