Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

8-bit accented characters not quoted-printable in extra headers ?

2 views
Skip to first unread message

Maurice Galland

unread,
Mar 12, 2003, 4:19:46 AM3/12/03
to
MUA: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130
MUA OS: RedHat Linux 7.3
MTA: qmail 1.03
MTA OS: RedHat Linux 6.1


Hi,

When I use 8-bit accented characters in extra headers in Mozilla
1.2.1/Linux (official mozilla.org binary release), they are not sent
using quoted-printable.

Here is an example: I send a message to the root user on the system
where my MTA resides.

MUA system (RH 7.3) MTA system (RH 6.1)
Mozilla 1.2.1 --> root user mbox file
Message composed using ISO-8859-1

Here is the message as it appears in the root mbox:

BEGIN MESSAGE --------------------------------------------------------

From maurice...@kariboo.com Wed Mar 12 08:57:27 2003
Return-Path: <maurice...@kariboo.com>
Delivered-To: root@corp
Received: (qmail 4367 invoked from network); 12 Mar 2003 08:57:27 -0000
Received: from nestor.corp (HELO kariboo.com) (10.0.0.6)
by jarvis.corp with SMTP; 12 Mar 2003 08:57:27 -0000
Message-ID: <3E6EF676...@kariboo.com>
Date: Wed, 12 Mar 2003 09:57:26 +0100
From: Maurice Galland <maurice...@kariboo.com>
Reply-To: maurice...@kariboo.com
Organization: Kariboo Technologies SA
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130
X-Accept-Language: fr-ch, fr-fr, fr, en-us, en
MIME-Version: 1.0
To: root@corp
Subject: =?ISO-8859-1?Q?=E9=E8=EA=E0=E2=F4=FB=EE=E4=F6=FC=EB=EF=E7=F1?=
X-FAX-Cover-Comments: รฉรจรชร| รขรดรปรฎรครถรผรซรฏรงรฑ
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Status: RO

้่๊เโ๔๛๎ไ๖๋๏็๑

END MESSAGE ----------------------------------------------------------

The same string is used in the body as in the Subject header and the
X-FAX-Cover-Comments extra header: ้่๊เโ๔๛๎ไ๖๋๏็๑

As you can see, this string appears as is in the body, as
quoted-printable in the Subject header, but is trashed in the
X-FAX-Cover-Comments extra header. It is probably bare ISO-8859-1,
because if I send this message to myself, Mozilla displays it correctly
when I switch to View->Headers->All.


Shouldn't all the headers be encoded as quoted-printable according to
RFC2047 ???

Maurice


----------------------------------------------------------------------
Maurice Galland maurice...@kariboo.com
Kariboo Technologies SA Tel: +41 21 641 05 50
Chemin de la For๊t 4 Fax: +41 21 641 05 52
1018 Lausanne - Switzerland

Maurice Galland

unread,
Mar 13, 2003, 6:32:34 AM3/13/03
to

Followup:

Is it somewhat related to the pref "mail.strictly_mime_headers" ?

As I can see from the "about:config" URL, mine is set to true.

???

Maurice

--

us...@domain.invalid

unread,
Mar 13, 2003, 9:27:45 AM3/13/03
to
Found it!

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. Any idea ?

See the old bug #68394:

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

for a similar problem regarding newsgroup posting.

Maurice

PS: Am I the only one on this thread ? I start to feel a bit 21st
century schizoid. REALLY no one interested ? :,o

J.B. Moreno

unread,
Mar 13, 2003, 11:33:10 PM3/13/03
to
In article <b4q42g$nv...@ripley.netscape.com>,
<us...@domain.invalid> wrote:

> PS: Am I the only one on this thread ? I start to feel a bit 21st
> century schizoid. REALLY no one interested ? :,o

I'm here, just nothing to say...

--
J.B. Moreno

us...@domain.invalid

unread,
Apr 30, 2003, 6:37:50 PM4/30/03
to
One month late but maybe your still watching for a reply ;-)
us...@domain.invalid wrote:

> Found it!
>
> 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. Any idea ?

There is a problem as you need to deal with multiple custom headers.
ENCODE_AND_PUSH won't do this IIRC, you need to encode when you create
the header which is in js. OR open up a whole can of worms and split
all the OTHER_RANDOM_HEADERS up again encode and then repush

Unfortunatly there is no access to the MIME encoding from js :-(

>>> X-FAX-Cover-Comments: éèêÃ| âôûîäöüëïçñ


>>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>>> Content-Transfer-Encoding: 8bit
>>> Status: RO
>>>

>>> ��������������ñ


>>>
>>> END MESSAGE ----------------------------------------------------------
>>>
>>> The same string is used in the body as in the Subject header and the

>>> X-FAX-Cover-Comments extra header: ��������������ñ


>>>
>>> As you can see, this string appears as is in the body, as
>>> quoted-printable in the Subject header, but is trashed in the
>>> X-FAX-Cover-Comments extra header. It is probably bare ISO-8859-1,
>>> because if I send this message to myself, Mozilla displays it
>>> correctly when I switch to View->Headers->All.
>>>
>>>
>>> Shouldn't all the headers be encoded as quoted-printable according to
>>> RFC2047 ???

Mail yes, news maybe not

This would be an easy fix if MIME encoding was available from user land...

/James

0 new messages