From: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: semi-gnus-ja@meadowy.org
Subject: decoding filenames containing `*'s
Date: Wed, 21 Jun 2006 07:40:09 +0900 [thread overview]
Message-ID: <b4mmzc8nu86.fsf_-_@jpl.org> (raw)
In-Reply-To: <87hd2ggcol.fsf@puyo.nijino.com>
[-- Attachment #1: Type: text/plain, Size: 256 bytes --]
Hi,
ARISAWA Akihiro reported Gnus doesn't decode file names that
attachments specify if there are the asterisk characters which
aren't quoted in those names. For example, the file attached
below has the name "a*.txt" (you can see it by typing `C-u g').
[-- Attachment #2: a*.txt --]
[-- Type: application/octet-stream, Size: 0 bytes --]
[-- Attachment #3: Type: text/plain, Size: 59 bytes --]
Another example which has the Japanese file name follows:
[-- Attachment #4: オンライン.txt --]
[-- Type: application/octet-stream, Size: 0 bytes --]
[-- Attachment #5: Type: text/plain, Size: 1424 bytes --]
I've fixed the `rfc2231-parse-string' function in both the trunk
and the v5-10 branch so that they might be decoded.
That the file name "a*.txt" doesn't appear in the former MIME
button is due to a bug of Gnus, because RFC2183 and RFC2045 does
not request that `*'s should be encoded in parameter values.
ARISAWA-san quoted the related specifications as follows:
RFC2183:
========
filename-parm := "filename" "=" value
[...]
NOTE ON PARAMETER VALUE LENGHTS: A short (length <= 78 characters)
parameter value containing only non-`tspecials' characters SHOULD be
represented as a single `token'. A short parameter value containing
only ASCII characters, but including `tspecials' characters, SHOULD
be represented as `quoted-string'.
RFC2045:
========
value := token / quoted-string
token := 1*<any (US-ASCII) CHAR except SPACE, CTLs,
or tspecials>
tspecials := "(" / ")" / "<" / ">" / "@" /
"," / ";" / ":" / "\" / <">
"/" / "[" / "]" / "?" / "="
As for the latter case, that the Japanese file name isn't decoded
is due to a bug of a certain mailer (he wrote that some version
of Thunderbird does it), since (also he wrote) RFC2231 specifies
that `*'s should be encoded in the `extended-parameter'. Even
so, because there is no reason that they should not be decoded,
Gnus now decodes such parameter values, though.
Regards,
parent reply other threads:[~2006-06-20 22:40 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <87hd2ggcol.fsf@puyo.nijino.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4mmzc8nu86.fsf_-_@jpl.org \
--to=yamaoka@jpl.org \
--cc=semi-gnus-ja@meadowy.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).