PHP Classes

Spaces in attached file names

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  Spaces in attached file names  >  (Un) Subscribe thread alerts  
Subject:Spaces in attached file names
Summary:Spaces in attached file names
Messages:2
Author:Christophe Charron
Date:2009-04-13 17:10:17
Update:2009-04-13 21:51:40
 

  1. Spaces in attached file names   Reply   Report abuse  
Picture of Christophe Charron Christophe Charron - 2009-04-13 17:10:17
Hi,

I have a little trouble while decoding this :

------=_20090406090517_88983
Content-Type: application/octet-stream; name="Pour Antonella ENIS
=?iso-8859-1?Q?signal=E9tiques.rar?="
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Pour Antonella ENIS
=?iso-8859-1?Q?signal=E9tiques.rar?="

The spaces after "ENIS" remain because I suppose it's multilne.
How can this be managed ?

Thanks for your help and suggestions.

P.S
They are not seen in this post, but in fact there are 5 spaces before =?iso ...

  2. Re: Spaces in attached file names   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2009-04-13 21:51:40 - In reply to message 1 from Christophe Charron
I tried putting that header in the sample message and it seems to work as expected.

Pour Antonella ENIS signalétiques.rar

It decoded the file name with 5 spaces between the words ENIS and signalétiques.rar . 1 space is from the first line and 4 spaces from the seconds line. The second line has 5 spaces but the first space is the continuation line character, so it should be omitted when decoding.