If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Encoding of Unicode XML file as an attachment in mails does not work

RESOLVED WORKSFORME

Status

MailNews Core
Database
RESOLVED WORKSFORME
14 years ago
9 years ago

People

(Reporter: Manfred Mustermann, Assigned: Bienvenu)

Tracking

Trunk
x86
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624

If you have a XML file in 16 Bit Unicode (as it may be created using Windows-OS)
and attach it to a mail the mail gets send as "multipart" and the
XML-Unicode-file-part gets sent encoded as "quoted-printable". This results in
destroying the CR LF line breaks. I was able to track the problem down to the
encoding scheme. In a Unicode XML file a CR LF is encoded like that: "0x00 0x0A
0x00 0x0D". Using quoted-printable encoding it gets encoded as
"=00<CR><LF>=00<CR><LF>" with <CR> is 0x0A and <LF> is 0x0D. As you can see
there is now later no way to reproduce the sequence "0x00 0x0A 0x00 0x0D". But
to be able to reproduce this is absolutely necessary. Decoding of such a
XML-Unicode file attachment will result in "0x00 0x0A 0x0D 0x00 0x0A 0x0D" which
is invalid in a Unicode XML file. Ergo: After sending an Unicode-XML file as an
attachment this file will no longer be a valid XML file if you save this
attachment (or simply decode this "quoted-printable" section).

Solution: Either improve the "quoted-printable" encoding or switch to "base64"
encoding as it is done for the non-ascii-attachments.


Reproducible: Always

Steps to Reproduce:
1. Create a XML file in 16 bit Unicode format
2. Attach it to a mail
3. Send the mail to your mail account
4. Retrieve the mail (f.e. via POP3)
5. Open the mail
6. Save the XML-file-attachment
7. Try to open the XML-file saved in step 6

Actual Results:  
Opening the XML file will not work, the original file and the file saved are
different. But they shouldn't be.

Expected Results:  
You should be able to have the same file after decoding as befor it was encoded
for sending the mail.
(Reporter)

Comment 1

14 years ago
Created attachment 137684 [details]
raw mail sniplet of XML file attached as it gets encoded
(Assignee)

Comment 2

14 years ago
please try 1.6 - I believe this is fixed.

Comment 3

13 years ago
Manfred Mustermann: comment 2 suggests that this bug was fixed; can you confirm 
with a current build of Mozilla (or Thunderbird)?
Product: MailNews → Core

Comment 4

13 years ago
No response from reporter; =>WFM
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → WORKSFORME
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.