[imp] Problems with subject/attachments coded in iso 8859 1 ?B?format

Michael M Slusarz slusarz@bigworm.colorado.edu
Thu, 13 Jun 2002 09:34:26 -0600


Quoting Miguel Ward <mward@aluar.com.ar>:

| Jan:
| 
| Ok. Found problem: My base64 lines are over 75 bytes in length.
| 
| Both in MIME.php (horde 2.1) and in lib.php (horde 1.2.7) you parse a
| maximum of
| 75 bytes (you state:
| 'the mime header spec says this is the longest a single encoded word can
| be').
| 
| This is true when converting to base64 but not the other way round (when
| converting from base64 there are no blank spaces in the original
| encoding).

No, this is the correct behavior.  From RFC 2047:

   An 'encoded-word' may not be more than 75 characters long, including
   'charset', 'encoding', 'encoded-text', and delimiters.  If it is
   desirable to encode more text than will fit in an 'encoded-word' of
   75 characters, multiple 'encoded-word's (separated by CRLF SPACE) may
   be used.

The 75 character maximum is necessary to coform to the 76 characters or 
less per line requirement in RFC 822.

The mailer sending you the encoded text is not RFC compliant (Hopefully it 
isn't IMP).

michael

______________________________________________
Michael Slusarz [slusarz@bigworm.colorado.edu]
The University of Colorado at Boulder