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
标题: email.MIME*.as_string removes duplicate spaces
类型: behavior Stage: test needed
Components: Extension Modules Versions: Python 2.6
process
状态: closed Resolution: duplicate
Dependencies: 后续: whitespace folding in the email package could be better ;-)
View: 5612
分配给: barry 抄送列表: ajaksu2, barry, hads, r.david.murray
优先级: normal 关键字: 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) 日期: 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) 日期: 2009-03-21 00:25
Confirmed on trunk.
msg97595 - (view) Author: R. David Murray (r.david.murray) * (Python committer) 日期: 2010-01-11 17:45
Duplicate of issue 5612, which has a small amount of additional info so I'm closing this one.
历史
日期 用户 动作 参数
2022-04-11 14:56:15admin修改github: 42859
2010-01-11 17:45:13r.david.murray修改状态: open -> closed

抄送: + r.david.murray
消息: + msg97595

后续: whitespace folding in the email package could be better ;-)
resolution: duplicate
2009-04-22 14:35:35ajaksu2修改keywords: + easy
2009-03-21 00:25:51ajaksu2修改versions: + Python 2.6, - Python 2.4
抄送: + ajaksu2

消息: + msg83898

type: behavior
stage: test needed
2006-02-02 02:25:18hads创建