#NEWLINE# def add_charset( charset , header_enc = None , body_enc = None , output_charset = None ) : #NEWLINE# #INDENT# "Add character set properties to the global registry.\n\n    charset is the input character set, and must be the canonical name of a\n    character set.\n\n    Optional header_enc and body_enc is either Charset.QP for\n    quoted-printable, Charset.BASE64 for base64 encoding, Charset.SHORTEST for\n    the shortest of qp or base64 encoding, or None for no encoding.  SHORTEST\n    is only valid for header_enc.  It describes how message headers and\n    message bodies in the input charset are to be encoded.  Default is no\n    encoding.\n\n    Optional output_charset is the character set that the output should be\n    in.  Conversions will proceed from input charset, to Unicode, to the\n    output charset when the method Charset.convert() is called.  The default\n    is to output in the same character set as the input.\n\n    Both input_charset and output_charset must have Unicode codec entries in\n    the module's charset-to-codec mapping; use add_codec(charset, codecname)\n    to add codecs the module does not know about.  See the codecs module's\n    documentation for more information.\n    " #NEWLINE# if ( body_enc == SHORTEST ) : #NEWLINE# #INDENT# raise ValueError ( 'SHORTEST not allowed for body_enc' ) #NEWLINE# #UNINDENT# CHARSETS [ body_enc ] = ( header_enc , body_enc , output_charset )