6.0.0-beta1
8/12/25

[#12452] imp messes up CSV file
Summary imp messes up CSV file
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester l.kiraly (at) madalbal (dot) hu
Created 07/12/2013 (4414 days ago)
Due
Updated 08/12/2013 (4383 days ago)
Assigned 08/09/2013 (4386 days ago)
Resolved 08/12/2013 (4383 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
08/12/2013 05:56:00 PM Michael Slusarz State ⇒ Resolved
 
08/09/2013 12:52:13 PM l (dot) kiraly (at) madalbal (dot) hu Comment #16 Reply to this comment
Sorry, but this commit messed up the previous good one 
(e3bff89cc6549b895c8aefdff4204b4044309ae8).

Now the EOL is wrong again. Please thet with the attached csv.
I don't know why, but it's good now.

08/09/2013 12:07:50 PM Jan Schneider Comment #15 Reply to this comment
It doesn't seem to be the same bug.
Right. I mixed up commits/tickets.
08/09/2013 10:32:26 AM l (dot) kiraly (at) madalbal (dot) hu Comment #14 Reply to this comment
It doesn't seem to be the same bug.

08/09/2013 09:43:49 AM Jan Schneider Comment #13
State ⇒ Assigned
Assigned to Michael Slusarz
Reply to this comment
08/08/2013 09:00:39 AM l (dot) kiraly (at) madalbal (dot) hu Comment #12 Reply to this comment
Sorry, but this commit messed up the previous good one 
(e3bff89cc6549b895c8aefdff4204b4044309ae8).

Now the EOL is wrong again. Please thet with the attached csv.

[Show Quoted Text - 19 lines]
08/05/2013 02:41:29 AM Git Commit Comment #11 Reply to this comment
Changes have been made in Git (master):

commit e895486b0d566d7e050e7a8959af19d0234d5d09
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Mon Aug 5 01:55:44 2013 -0600

     Partially revert "[mms] Use the correct EOL string when transfer 
encoding content (Bug #12452)."

     This reverts commit e3bff89cc6549b895c8aefdff4204b4044309ae8.

     This needs to be fixed by doing auto-EOL determination

  framework/Mime/lib/Horde/Mime/Part.php      |   21 ++++++++++-----------
  framework/Mime/package.xml                  |    7 +++++++
  framework/Mime/test/Horde/Mime/PartTest.php |   18 +-----------------
  3 files changed, 18 insertions(+), 28 deletions(-)

http://git.horde.org/horde-git/-/commit/e895486b0d566d7e050e7a8959af19d0234d5d09
07/25/2013 01:42:18 AM Michael Slusarz Comment #10
Version ⇒ Git master
Queue ⇒ Horde Framework Packages
State ⇒ Resolved
Reply to this comment
Horde_Mime 2.2.4
07/25/2013 01:42:09 AM Git Commit Comment #9 Reply to this comment
Changes have been made in Git (master):

commit e3bff89cc6549b895c8aefdff4204b4044309ae8
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Wed Jul 24 19:40:40 2013 -0600

     [mms] Use the correct EOL string when transfer encoding content 
(Bug #12452).

  framework/Mime/lib/Horde/Mime/Part.php |   13 +++++++++----
  framework/Mime/package.xml             |    4 ++--
  2 files changed, 11 insertions(+), 6 deletions(-)

http://git.horde.org/horde-git/-/commit/e3bff89cc6549b895c8aefdff4204b4044309ae8
07/22/2013 09:39:48 AM l (dot) kiraly (at) madalbal (dot) hu Comment #8 Reply to this comment
Can you please test the attached test.csv if it's good for you after 
sending or not?
07/18/2013 08:34:40 AM l (dot) kiraly (at) madalbal (dot) hu Comment #7 Reply to this comment
According to my observations, the csv content will have extra 
linefeeds, when it's content-transfer-encoding is quoted-printable. 
The encoding depends what the client sends to the server. From my XP 
machine if I send mail with attached csv the Content-Type is 
application/vnd.ms-excel and the Content-Transfer-Encoding is base64. 
In this chase the content of the csv is good.
But from other XP or Win7 machines regardless they have installed 
excel, the Content-Type is text/plain and the 
Content-Transfer-Encoding is quoted-printable. In this chase the csv 
content has extra linefeeds.
07/17/2013 08:57:49 AM l (dot) kiraly (at) madalbal (dot) hu Comment #6
New Attachment: test.csv Download
Reply to this comment
What other mail system do you think?
I tested this withhin horde, I sent email to myself.

I created and attached a very simple csv file.
Could you please test this?

07/15/2013 04:33:29 PM Michael Slusarz Comment #5 Reply to this comment
No it doesn't.  We don't add ANY line feeds to output.  If any are 
being added, they are being added by another mail system other than 
Horde/IMP.
07/15/2013 03:15:40 PM l (dot) kiraly (at) madalbal (dot) hu Comment #4 Reply to this comment
I realized, that even if I change Content-Type to text/csv it'll be wrong.
The real problem is the Content-Transfer-Encoding. If it's base64, the 
file will be good, but with quoted-printable encoding, the content 
will get extra linefeeds.

07/13/2013 08:25:23 PM l (dot) kiraly (at) madalbal (dot) hu Comment #3 Reply to this comment
Why did you change to "Not a bug"?

The fact is that if the user doesn't have mime association to ".csv"   
then the file will be wrong.
It is a webmail problem, not the user's problem.

My suggestion is, if horde has the mime mapping even if it's "text/*" 
use that. It's more reliable than the fileinfo package.
07/13/2013 06:28:11 PM Michael Slusarz State ⇒ Not A Bug
 
07/13/2013 08:10:19 AM l (dot) kiraly (at) madalbal (dot) hu Comment #2 Reply to this comment
It's because php fileinfo gives text/plain; charset=iso-8859-1 for 
that file, which is entirely wrong.
07/12/2013 10:40:58 AM l (dot) kiraly (at) madalbal (dot) hu Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Summary ⇒ imp messes up CSV file
Type ⇒ Bug
Queue ⇒ IMP
Reply to this comment
I have a file named: "Madalbal Sprinter Járat Export_20130712_104907.csv"

If I attach this file, horde threats this file as text/plain and in 
this way the csv gets extra 0x0a and 0x0d characters at the end of the 
rows.

It messes up the CSV

I don't know if the filename*1 field should contain the file extension only?

here is the relevant source what was generated:
---
--=_VlA-bfgbnALjE_FrMe9vhQ3
Content-Type: text/plain;
  name*0*=iso-8859-1''Madalbal%20Sprinter%20J%E1rat%20Export_20130712_104907.;
  name*1*=csv; charset=iso-8859-1
Content-Disposition: attachment; size=17681;
  filename*0*=iso-8859-1''Madalbal%20Sprinter%20J%E1rat%20Export_20130712_104;
  filename*1*=907.csv
Content-Transfer-Encoding: quoted-printable
---

Saved Queries