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: non-ASCII whitespace after a space is lost from address display names · Issue #161678 · 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 description:The import email from email import policy from email.message import EmailMessage from email.headerregistry import Address m = EmailMessage() m['To'] = Address('. \xa0b', 'u', 'example.com') print(m['To']) # =?utf-8?q?=2E_=C2=A0?=b <[email protected]> m2 = email.message_from_string(m.as_string(), policy=policy.default) print(ascii(m2['To'].addresses[0].display_name)) # '. b', expected '. \xa0b' Received mail is affected too: The cause is def get_fws(value): """FWS = 1*WSP ... newvalue = value.lstrip()
I couldn't find a test or comment saying stripping all Unicode whitespace was intended. CPython versions tested on:3.13, CPython main branch Operating systems tested on:Windows 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 01402503 — 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. |