summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2024-03-05 15:49:01 (GMT)
committerGitHub <noreply@github.com>2024-03-05 15:49:01 (GMT)
commitf97f25ef5dfcdfec0d9a359fd970abd139cf3428 (patch)
tree989a8a5b5c21dcff639abc58adadb9b512b73854 /Misc
parentdf594011089a83d151ac7000954665536f3461b5 (diff)
downloadcpython-f97f25ef5dfcdfec0d9a359fd970abd139cf3428.zip
cpython-f97f25ef5dfcdfec0d9a359fd970abd139cf3428.tar.gz
cpython-f97f25ef5dfcdfec0d9a359fd970abd139cf3428.tar.bz2
gh-76511: Fix email.Message.as_string() for non-ASCII message with ASCII charset (GH-116125)
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2024-02-29-17-06-54.gh-issue-76511.WqjRLP.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2024-02-29-17-06-54.gh-issue-76511.WqjRLP.rst b/Misc/NEWS.d/next/Library/2024-02-29-17-06-54.gh-issue-76511.WqjRLP.rst
new file mode 100644
index 0000000..da62f8a
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-02-29-17-06-54.gh-issue-76511.WqjRLP.rst
@@ -0,0 +1,4 @@
+Fix UnicodeEncodeError in :meth:`email.Message.as_string` that results when
+a message that claims to be in the ascii character set actually has non-ascii
+characters. Non-ascii characters are now replaced with the U+FFFD replacement
+character, like in the ``replace`` error handler.