cpython/Lib/test/test_email
Miss Islington (bot) 6809811036
[3.14] Correctly fold unknown-8bit originating from encoded words. (GH-142517) (#143146)
The unknown-8bit trick was designed to deal with unknown bytes in an
ASCII message, and it works fine for that.  However, I also tried to
extend it to handle bytes that can't be decoded using the charset
specified in an encoded word, and there it fails because there can be
other non-ASCII characters that were *successfully* decoded.  The fix is
simple: do the unknown-8bit encoding using the utf-8 codec.  This is
especially appropriate since anyone trying to do recovery on an unknown
byte string will probably attempt utf-8 first.
(cherry picked from commit 1e17ccd030)

Co-authored-by: R. David Murray <rdmurray@bitdance.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-24 13:20:05 -05:00
..
data [3.14] gh-139434: Update selected RFC 2822 references to RFC 5322 (GH-139435) (#141025) 2025-11-04 16:23:16 -05:00
__init__.py
__main__.py
test__encoded_words.py
test__header_value_parser.py [3.14] Correctly fold unknown-8bit originating from encoded words. (GH-142517) (#143146) 2025-12-24 13:20:05 -05:00
test_asian_codecs.py gh-126133: Only use start year in PSF copyright, remove end years (#126236) 2024-11-12 15:59:19 +02:00
test_contentmanager.py gh-71339: Use new assertion methods in the email tests (GH-129055) 2025-04-14 09:25:58 +03:00
test_defect_handling.py [3.14] gh-68552: fix defects policy (GH-138579) (#142366) 2025-12-09 07:39:01 +00:00
test_email.py [3.14] gh-68552: fix defects policy (GH-138579) (#142366) 2025-12-09 07:39:01 +00:00
test_generator.py gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233) 2024-07-31 00:19:48 +02:00
test_headerregistry.py [3.14] gh-79986: Add parsing for References/In-Reply-To email headers (GH-137201) (#142573) 2025-12-21 14:35:24 -05:00
test_inversion.py
test_message.py [3.14] gh-135307: Fix email error when policy max_line_length is set to 0 or None (GH-135367) (#140915) 2025-11-02 10:03:12 -05:00
test_parser.py
test_pickleable.py
test_policy.py gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233) 2024-07-31 00:19:48 +02:00
test_utils.py gh-118761: Add test_lazy_import for more modules (#133057) 2025-05-05 22:46:05 +00:00
torture_test.py gh-126133: Only use start year in PSF copyright, remove end years (#126236) 2024-11-12 15:59:19 +02:00