user-defined headers not encoded per RFC2047 (quoted-printable) for non-ASCII characters

RESOLVED WORKSFORME

Status

MailNews Core
Internationalization
RESOLVED WORKSFORME
15 years ago
3 years ago

People

(Reporter: Maurice Galland, Assigned: smontagu)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130

Extra header value is not QPed when it contains 8-bit accented characters.

Reproducible: Always

Steps to Reproduce:
1. Define an extra header in your user.js file (for instance: X-FAX-Cover-Comments)
2. Restart Mozilla
3. Open Mail
4. In Preferences, set every mail character settings to ISO-8859-1
5. Compose a message to yourself where Subject, Body and X-FAX-Cover-Comments
are: ιθκΰβτϋξδφόλοηρ
6. Send the message
7. Read the message in Mozilla: everything is displayed correctly
8. With a text editor, look at your inbox FILE:
- the Subject value appears as:
=?ISO-8859-1?Q?=E9=E8=EA=E0=E2=F4=FB=EE=E4=F6=FC=EB=EF=E7=F1?=
which is the QPed value of ιθκΰβτϋξδφόλοηρ;
- the X-FAX-Cover-Comments value appears as:
éè�à âôûîäöüëïçñ
which is obviously not QPed !

Actual Results:  
Extra header value is not QPed.

Expected Results:  
Extra header value should have been QPed.

The preference "mail.strictly_mime_headers" is set to true (default).
System character set is ISO-8859-1.
I don't know for sure, but I guess that this problem is not related to Linux.
See above URL for a (unsuccessful :-) newsgroup posting to
netscape.public.mozilla.mail-news.

In Mozilla source code, mailnews/compose/src/nsMsgCompUtils.cpp use the
ENCODE_AND_PUSH() macro to QP the To: From: CC: Reply-To: Subject: fields (as
well as a bunch of others) but use the PUSH_STRING() macro around extra headers.

ENCODE_AND_PUSH() use nsMsgI18NEncodeMimePartIIStr() to convert from UTF-8 to
QP. UTF-8 seems to be the charset used internally to manipulate headers (?).

PUSH_STRING(), defined in ./mailnews/compose/src/nsMsgSend.h, does not touch
encoding.

I don't know for sure if it's a bug or if extra headers should not be QPed for
any particular reason. I guess that the ideal situation would be to have the
choice for each individual extra header (oops).

See the old bug #68394:

http://bugzilla.mozilla.org/show_bug.cgi?id=68394

for a similar problem regarding newsgroup posting.
(Reporter)

Comment 1

15 years ago
Would that be possible to have at least some kind of comment on this problem ?
Sure it is no high priority game, but, you know, I'd appreciate ;-)
(Assignee)

Comment 2

15 years ago
nhotta, can you look at this?

Comment 3

15 years ago
>1. Define an extra header in your user.js file 
>(for instance: X-FAX-Cover-Comments)
I did not know about this feature. What is the pref line to do that?


(Reporter)

Comment 4

15 years ago
For instance (here I add two new headers):

user_pref("mail.compose.other.header", "X-FAX-Dialstring,X-FAX-Cover-Comments");

See: http://www.mozilla.org/mailnews/arch/compose/hiddenprefs.html
(Reporter)

Comment 5

15 years ago
Knock, knock. Remember ?
Product: MailNews → Core

Comment 6

13 years ago
Yes, this happens.  Very easy to reproduce.  I set up a user-defined header
  Mail-Copies-To
I compose a message, and set the header to
  Mé <mcow@well.com>
I sent it and looked at the source of the Sent message; the header characters 
had been sent as raw UTF-8.

Reproduced with Thunderbird 1.0+0309.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Summary: 8-bit accented characters not quoted-printable in extra headers → user-defined headers not encoded per RFC2047 (quoted-printable) for non-ASCII characters
Product: Core → MailNews Core
QA Contact: marina → i18n
Blocks: 673092
Fixed by bug 998191.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.