summaryrefslogtreecommitdiffstats
path: root/Lib/email/Charset.py
Commit message (Collapse)AuthorAgeFilesLines
* Port relevant patches for SF 1409455 to the trunk for email 3.0/Python 2.5.Barry Warsaw2006-02-081-2/+2
| | | | Will port to Python 2.4.
* __init__(): Coerce the input_charset to unicode (with ascii encoding) beforeBarry Warsaw2004-10-091-2/+3
| | | | | | calling .lower() on it. This fixes the problem described in SF patch # 866982 where in the tr_TR.ISO-8859-9 locale, 'I'.lower() isn't 'i'. unicodes are locale insensitive.
* Big email 3.0 API changes, with updated unit tests and documentation.Barry Warsaw2004-10-031-18/+6
| | | | | | | | | | | | | | | | | Briefly (from the NEWS file): - Updates for the email package: + All deprecated APIs that in email 2.x issued warnings have been removed: _encoder argument to the MIMEText constructor, Message.add_payload(), Utils.dump_address_pair(), Utils.decode(), Utils.encode() + New deprecations: Generator.__call__(), Message.get_type(), Message.get_main_type(), Message.get_subtype(), the 'strict' argument to the Parser constructor. These will be removed in email 3.1. + Support for Python earlier than 2.3 has been removed (see PEP 291). + All defect classes have been renamed to end in 'Defect'. + Some FeedParser fixes; also a MultipartInvariantViolationDefect will be added to messages that claim to be multipart but really aren't. + Updates to documentation.
* Update to Python 2.3, getting rid of backward compatiblity crud.Barry Warsaw2004-05-091-16/+7
|
* Fixes to support CJKCodecs as per SF bug #852347. Actually, thisBarry Warsaw2003-12-301-19/+16
| | | | | | | | | | | patch removes dependencies on the old unsupported KoreanCodecs package and the alternative JapaneseCodecs package. Since both of those provide aliases for their codecs, this removal just makes the generic codec names work. We needed to make slight changes to __init__() as well. This will be backported to Python 2.3 when its branch freeze is over.
* Merge of the folding-reimpl-branch. Specific changes,Barry Warsaw2003-03-061-2/+4
| | | | | | | | Charset: Alias __repr__ to __str__ for debugging. header_encode(): When calling quopriMIME.header_encode(), set maxlinelen=None so that the lower level function doesn't (also) try to wrap/fold the line.
* CHARSETS, ALIASES, CODEC_MAP: SF feature request 633543, KoreanBarry Warsaw2003-01-071-0/+37
| | | | | | | | | support and other charset defaults. See also: http://article.gmane.org/gmane.comp.python.mime.devel/250 (this just commits the last bit of the article that wasn't part of email 2.4.3.)
* body_encode(): Fixed typo reported by Chris Lawrence, closing SF bugBarry Warsaw2002-10-211-1/+1
| | | | | | #625509. This isn't a huge problem because at the moment there are no built-in charsets for which header_encoding is QP but body_encoding is not.
* CHARSETS: Add faux '8bit' encoding for representing raw 8-bit data forBarry Warsaw2002-10-141-0/+2
| | | | which we know nothing else.
* Update the urls and other information about the add-on Japanese,Barry Warsaw2002-10-131-13/+8
| | | | Korean, and Chinese codecs.
* __init__(): RFC 2046 $4.1.2 says charsets are not case sensitive.Barry Warsaw2002-10-101-1/+3
| | | | | Coerce the argument to lower case. Also, since body encodings can't be SHORTEST, default the CHARSETS failobj's second item to BASE64.
* Docstring consistency with the updated .tex files.Barry Warsaw2002-10-011-13/+13
|
* Added a feature suggested by Martin v Loewis, where a new headerBarry Warsaw2002-09-281-37/+55
| | | | | | | | | | | | | encoding flag SHORTEST means to return the shortest encoding between base64 and qp. This is used for the header_enc for utf-8. SHORTEST isn't legal for body_enc. Also some code cleanup: - use True/False everywhere - use == instead of `is' in a few places - added _unicode() and make consistent the "is unicode" checks - update docstrings
* Whitespace normalization.Tim Peters2002-08-231-1/+1
|
* _is_unicode(): Use UnicodeType instead of the unicode builtin forBarry Warsaw2002-06-011-1/+3
| | | | Python 2.1 compatibility.
* Importing Charset should not fail when Unicode is disabled. (XXXGuido van Rossum2002-05-281-3/+11
| | | | | Using Unicode-aware methods may still die with a NameError on unicode. Maybe there's a more elegant solution but I doubt anybody cares.)
* Whitespace normalization.Tim Peters2002-05-231-4/+4
|
* Sync'ing with standalone email package 2.0.1. This adds support forBarry Warsaw2002-04-101-0/+327
non-us-ascii character sets in headers and bodies. Some API changes (with DeprecationWarnings for the old APIs). Better RFC-compliant implementations of base64 and quoted-printable. Updated test cases. Documentation updates to follow (after I finish writing them ;).