Tb puts UTF-8 binary(generated by Tb) and KOI8-R binary(from original HTML) in saved mail as HTML, when headers uses charset=KOI8-R & quoted-printable encoding

NEW
Unassigned

Status

Thunderbird
General
10 years ago
3 years ago

People

(Reporter: intendentedelleacque, Unassigned)

Tracking

({testcase})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: 

If you import/receive the attached mail in Thunderbird and then save it in HTML format, you'll have a file with the content encoded in KOI8-R (right) and the headers encoded in UTF-8 (wrong).

Making some tests, I found out that this happens just when the headers are encoded in base64; at the contrary the HTML file is correct if the KOI8-R message is created by Thunderbird, that uses the "Quoted-printable" format for KOI8-R headers.

Notice that this bug happens just on saving mails, but not on displaying them: I think that it could be related to something in nsStreamConverter. In fact, developing an extension, I found out that the bug happens when you use additional header "header=saveas", but doesn't when you use no addtional header.
Anyway I'm not so expert, so I don't know if this has some meaning...

P.S: I don't know the russian language, so I don't know what it's written in the attached mail (I hope nothing bad...)!!!


Reproducible: Always

Steps to Reproduce:
1. import/receive the attached mail
2. save it in HTML format
Actual Results:  
The HTML has the wrong encoding in headers (UTF-8 instead of KOI8-R)

Expected Results:  
Also headers should be encoded in KOI8-R

Verified on TB 1.5 and TB 2.0 both on Linux and Windows
(Reporter)

Comment 1

10 years ago
Created attachment 268069 [details]
Mail with subject in KOI8-R and text/html part in KOI8-R/quoted-printable encoding
Keywords: testcase
Attachment #268069 - Attachment description: Mail with subject in KOI8-R and base64 encoding → Mail with subject in KOI8-R and text/html part in KOI8-R/quoted-printable encoding
Attachment #268069 - Attachment mime type: message/rfc822 → text/plain
Problem still occurs in Tb 24.5.0.
   Mixed binary of UTF-8(part generated by Tb) and KOIR-8(original HTML in mail) is used in saved .html file.
    <html><head><title> Binary of UTF-8 </title> ... </head><body>
    <table ...><tr><td><b>Subject: </b> Binary of UTF-8 </td></tr> ... </table>
    <table ...> ... </table><br>
     HTML source starting with top <!DOCTYPE ...><HTML>, including last </BODY></HTML> in text/html part,
     which is decoded from quoted-printable. 
    This portion is binary of KOIR-8.
    </body></html>

Confirming
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Wrong headers encoding in saving mails in HTML, when headers uses charset type+base64 encoding → Tb puts UTF-8 binary(generated by Tb) and KOIR-8 binary(from original HTML) in saved mail as HTML, when headers uses charset=KOIR-8 & quoted-printable encoding
Summary: Tb puts UTF-8 binary(generated by Tb) and KOIR-8 binary(from original HTML) in saved mail as HTML, when headers uses charset=KOIR-8 & quoted-printable encoding → Tb puts UTF-8 binary(generated by Tb) and KOI8-R binary(from original HTML) in saved mail as HTML, when headers uses charset=KOI8-R & quoted-printable encoding
You need to log in before you can comment on or make changes to this bug.