Re: email.header.decode_header eats my spaces

Mark Sapiro <[email protected]>
Newsgroups gmane.comp.python.mime.devel
Organization Not Very Much
Message-ID <PC19220091007204013073440a144ab@msapiro>

----- Original Message ---------------

Subject: [Email-SIG]  email.header.decode_header eats my spaces
   From: [email protected]
   Date: 6 Sep 09 02:18:14 -0500
     To: [email protected]


If you're talking about spaces between encoded words as in the space
between the ?= and the =? in

Subject: =?iso-8859-1?q?Hello?= =?iso-8859-1?q?World?=

it's supposed to. RFC 2047, section 6.2 says in part

   When displaying a particular header field that contains multiple
   'encoded-word's, any 'linear-white-space' that separates a pair of
   adjacent 'encoded-word's is ignored.  (This is to allow the use of
   multiple 'encoded-word's to represent long strings of unencoded text,
   without having to separate 'encoded-word's where spaces occur in the
   unencoded text.)


-- 
Mark Sapiro <[email protected]>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.