[issue40837] email.utils.encode_rfc2231(string, None, None) returns broken value

SpaceOne report at bugs.python.org
Sun May 31 22:17:06 EDT 2020


New submission from SpaceOne <python at florianbest.de>:

`encode_rfc2231()` must not change the returned value if no transformation of the input was done.
This is also mentioned in the docstring of that function.

Actual behavior:
encode_rfc2231('foo bar', None, None)
'foo%20bar'

Expected behavior:
encode_rfc2231('foo bar', None, None)
'foo bar'

----------
components: Library (Lib)
messages: 370526
nosy: spaceone
priority: normal
pull_requests: 19805
severity: normal
status: open
title: email.utils.encode_rfc2231(string, None, None) returns broken value
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40837>
_______________________________________


More information about the Python-bugs-list mailing list