>>> email.Header.decode_header("=?us-ascii?Q?Re=3A=20=5Bosg=2Duser=5D=20Culling=20problem?=")
[('Re: [osg-user] Culling problem', 'us-ascii')]
>>> email.Header.decode_header("=?gb2312?B?cXVlc3Rpb24gYWJvdXQgbG9hZGluZyBmbHQgbGFyZ2UgdGVycmFpbiA=?=")
[('question about loading flt large terrain ', 'gb2312')]
>>> help(email.Header.decode_header)
Help on function decode_header:

decode_header(header)
    Decode a message header value without converting charset.
    
    Returns a list of (decoded_string, charset) pairs containing each of
    the decoded parts of the header.  Charset is None for non-encoded
    parts of the header, otherwise a lower-case string containing the
    name of the character set specified in the encoded string.
    
    An email.Errors.HeaderParseError may be raised when certain decoding
    error occurs (e.g. a base64 decoding exception).

Jeff

Attachment: pgpkPvVph3Usz.pgp
Description: PGP signature

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to