This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: email.MIME*.as_string removes duplicate spaces
Type: behavior Stage: test needed
Components: Extension Modules Versions: Python 2.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder: whitespace folding in the email package could be better ;-)
View: 5612
Assigned To: barry Nosy List: ajaksu2, barry, hads, r.david.murray
Priority: normal Keywords: easy

Created on 2006-02-02 02:25 by hads, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg27408 - (view) Author: hads (hads) Date: 2006-02-02 02:25
In the following example all of the multiple spaces  
in the subject will be compressed into one space  
each.   
   
from email.MIMEMultipart import MIMEMultipart   
   
outer = MIMEMultipart()   
outer['Subject'] = "Subjects   longer than 68  
characters   with    multiple spaces   
get converted to    one space."   
   
print outer.as_string()   
  
  
Will print:  
  
Content-Type: multipart/mixed; 
boundary="===============0820565010==" 
MIME-Version: 1.0 
Subject: Subjects longer than 68 characters with 
multiple spaces get converted 
        to one space. 
 
--===============0820565010== 
 
--===============0820565010==-- 
  
msg83898 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-03-21 00:25
Confirmed on trunk.
msg97595 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-01-11 17:45
Duplicate of issue 5612, which has a small amount of additional info so I'm closing this one.
History
Date User Action Args
2022-04-11 14:56:15adminsetgithub: 42859
2010-01-11 17:45:13r.david.murraysetstatus: open -> closed

nosy: + r.david.murray
messages: + msg97595

superseder: whitespace folding in the email package could be better ;-)
resolution: duplicate
2009-04-22 14:35:35ajaksu2setkeywords: + easy
2009-03-21 00:25:51ajaksu2setversions: + Python 2.6, - Python 2.4
nosy: + ajaksu2

messages: + msg83898

type: behavior
stage: test needed
2006-02-02 02:25:18hadscreate