GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — email.utils.encode_rfc2231() writes 'None' as the charset when only language is given · Issue #161222 · python/cpython Open Labels stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-emailtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportBug description:
>>> import email.utils >>> email.utils.encode_rfc2231('abc', language='en') "None'en'abc" The same happens when a >>> from email.message import Message >>> m = Message() >>> m.add_header('Content-Disposition', 'attachment', filename=(None, 'en', 'report.txt')) >>> m['Content-Disposition'] "attachment; filename*=None'en'report.txt" RFC 2231 section 4 says "it is perfectly permissible to leave either the character set or language field blank", so the expected result is This is separate from gh-85014, which covers the case where both charset and language are CPython versions tested on:3.15, CPython main branch Operating systems tested on:Linux Linked PRsActivity
MetadataMetadataAssigneesLabelsstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-emailtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |