Subject: "=?iso8859-1?Q?" in suggested attachment filenames

From: Erik Inge Bolsø <[email-masked]>
Date: Fri, 7 Sep 2001 09:13:32 +0200 (CEST)

Greetings.

I'm wondering, is there any patch for pine that fixes the problem that
iso-8859-1 quoted strings as filenames are not decoded?

Included below is a message from the Evolution mailing list earlier this
year, addressing this problem.

> Note that RFC 2183 does not require (ie, it doesn't say SHOULD or MUST)
> that the filename attribute be used as the basis for the name of the
> saved file.

Oops, what I meant to say was: 2183 doesn't require that the filename
attribute be used as the saved filename, but recommends that it be used
as the BASIS for the filename and that the filename be changed according
to avoid file name conflicts, enusre legal filename on local filesystem,
etc.

RFC 2184 specifies how to deal with long filename parameters and
filenames containing non-ascii characters, but Evolution currently
neither recognizes nor produces RFC2184-compliant MIME-headers.

Here's how different mailers set the filename attribute:

1. Elm and Evolution:
filename="áó éíñ.txt"
2. Mozilla:
filename="=?iso-8859-1?Q?=E1=F3=20=E9=ED=F1=2Etxt?="
3. Outlook
filename="=?iso-8859-1?B?4fMg6e3xLnR4dA==?="
4. Pine
filename*="X-UNKNOWN''%E1%F3 %E9%ED%F1.txt"

1 is illegal since it contains 8-bit characters, which can't occur in a
quoted-text string.

2 and 3 are legal, but don't have the right semantics: if an attribute
value starts and ends with "'s, it's a quoted-string, and so
"=?iso-8859-1?B?4fMg6e3xLnR4dA==?=" refers to the string

=?iso-8859-1?B?4fMg6e3xLnR4dA==?=

and not the intended

áó éíñ.txt

4 is legal, but not RFC 2184-compliant, since extended-value isn't
supposed to have any quotes around it, or spaces within.

The correct way would be:
filename*=X-UNKNOWN''%E1%F3%20%E9%ED%F1.txt

Evolution should generate the correct version, and accept the incorrect
versions (ie, interpret all versions above as "áó éíñ.txt")

-Richard

-- 
Erik I. Bolsø, Triangel Maritech Software AS
Tlf: 712 41 694		Mobil: 915 79 512

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------