From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61995 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus doesn't encode non-ascii attachment filenames Date: Wed, 15 Feb 2006 07:49:27 +0900 Organization: Emacsen advocacy group Message-ID: References: <8764njdbxi.fsf@emacsfans.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1139957797 11041 80.91.229.2 (14 Feb 2006 22:56:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 14 Feb 2006 22:56:37 +0000 (UTC) Cc: bugs@gnus.org, ding@gnus.org Original-X-From: ding-owner+m10523@lists.math.uh.edu Tue Feb 14 23:56:33 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F995G-0006rn-85 for ding-account@gmane.org; Tue, 14 Feb 2006 23:55:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1F9959-0003lI-00; Tue, 14 Feb 2006 16:55:39 -0600 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1F990S-0003lA-00 for ding@lists.math.uh.edu; Tue, 14 Feb 2006 16:50:48 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1F990O-00068D-EL for ding@lists.math.uh.edu; Tue, 14 Feb 2006 16:50:48 -0600 Original-Received: from washington.hostforweb.net ([66.225.201.13]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1F990M-0003ws-00; Tue, 14 Feb 2006 23:50:42 +0100 Original-Received: from [205.234.185.198] (port=55650 helo=mail.jpl.org) by washington.hostforweb.net with esmtpa (Exim 4.52) id 1F993S-0006wY-0x; Tue, 14 Feb 2006 16:53:56 -0600 Original-To: Zhang Wei X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:9S9v6cAQIpJxAm1iI9eovvmEQZ4= X-Hashcash: 1:20:060214:id.brep@gmail.com::K6CZfl/mFWvtd9Rk:000000000000000000000000000000000000000000001XDq X-Hashcash: 1:20:060214:bugs@gnus.org::rc68OeIRUFhGTPUE:0000FC24 X-Hashcash: 1:20:060214:ding@gnus.org::310BQoldxTsgaCaf:00003cRM X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - washington.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -2.5 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:61995 Archived-At: >>>>> In <8764njdbxi.fsf@emacsfans.org> Zhang Wei wrote: > While composing mail, if I attach a file with non-ascii(chinese > actually) filename, it's failed to correctly encode the filename. > -- > Zhang Wei or Brep > How is it incorrect? Gnus does the RFC2231 encoding, that is very correct. However, in fact, many mail softwares don't understand it. They likely use the RFC2047-like encoding that can understand only them. That has not been standardized. Gnus can handle such an encoding, though. Here's an extract from the Emacs MIME manual. Does it help? `rfc2047-encode-parameter' Encode a parameter in the RFC2047-like style. This is a replacement for the `rfc2231-encode-string' function. *Note rfc2231::. When attaching files as MIME parts, we should use the RFC2231 encoding to specify the file names containing non-ASCII characters. However, many mail softwares don't support it in practice and recipients won't be able to extract files with correct names. Instead, the RFC2047-like encoding is acceptable generally. This function provides the very RFC2047-like encoding, resigning to such a regrettable trend. To use it, put the following line in your `~/.gnus.el' file: (defalias 'mail-header-encode-parameter 'rfc2047-encode-parameter)