From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/28419 Path: main.gmane.org!not-for-mail From: Georges KO Newsgroups: gmane.emacs.gnus.general Subject: Re: Problems with: 1) French guillemets and Big5 in regexps, 2) QP filename MIME Date: Thu, 23 Dec 1999 13:45:19 +0800 Organization: Alcatel Telecom Taiwan Sender: owner-ding@hpc.uh.edu Message-ID: <99Dec23.133809gmt+0800.27976@ns.alcatel.com.tw> References: <99Dec23.094212gmt+0800.27855@ns.alcatel.com.tw> Reply-To: gko@gko.net NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035165270 29786 80.91.224.250 (21 Oct 2002 01:54:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:54:30 +0000 (UTC) Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by mailhost.sclp.com (Postfix) with ESMTP id A88BAD051F for ; Thu, 23 Dec 1999 01:07:07 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id XAB19431; Thu, 23 Dec 1999 00:00:02 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 22 Dec 1999 23:59:27 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id XAA02044 for ; Wed, 22 Dec 1999 23:59:15 -0600 (CST) Original-Received: from alcatel.com.tw (www.alcatel.com.tw [202.39.115.1]) by mailhost.sclp.com (Postfix) with SMTP id 30343D051F for ; Thu, 23 Dec 1999 00:57:29 -0500 (EST) Original-Received: by ns.alcatel.com.tw id <27976>; Thu, 23 Dec 1999 13:38:09 +0800 Original-To: ding@gnus.org Original-Original-Sender: gko@alcatel.com.tw In-Reply-To: Georges KO's message of "Thu, 23 Dec 1999 09:49:25 +0800" Original-Lines: 64 User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:28419 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:28419 Georges KO writes: > Another problem I have is with MIME: sometimes, I have the > following button: > > [2. image/jpeg; =?big5?B?rNm5cS5qcGc=?=]... > > which cannot be saved (without modifying the name) for viewing... To display and save it, I have added mail-decode-encoded-word-string in gnus-insert-mime-button and mm-save-part: (defun gnus-insert-mime-button (handle gnus-tmp-id &optional displayed) (let ((gnus-tmp-name (mail-decode-encoded-word-string (or (mail-content-type-get (mm-handle-type handle) ... (defun mm-save-part (handle) "Write HANDLE to a file." (let* ((name (mail-content-type-get (mm-handle-type handle) 'name)) (filename (mail-decode-encoded-word-string (mail-content-type-get (mm-handle-disposition handle) 'filename))) ... To view the contents, I can save in the temporary directory, but I have problems when start-process is called in mm-display-external. I moved the filename stuff in the front: (defun mm-display-external (handle method) "Display HANDLE using METHOD." (let* ((filename (mail-decode-encoded-word-string (mail-content-type-get (mm-handle-disposition handle) 'filename))) (dir (make-temp-name (expand-file-name "emm." mm-tmp-directory))) (file (if filename (expand-file-name (file-name-nondirectory filename) dir) (make-temp-name (expand-file-name "mm." dir))))) (mm-with-unibyte-buffer (if (functionp method) ... But when start-process is called, it seems not to pass Big5 characters to the sub-process. I added coding-system-for-write, where file-name-coding-system is 'cn-big5: (let ((coding-system-for-write file-name-coding-system)) (start-process "*display*" (setq buffer (generate-new-buffer "*mm*")) shell-file-name shell-command-switch (mm-mailcap-command method file (mm-handle-type handle)))) but it doesn't work. I tried in *scratch* the same expression but with (mm-mailcap-...) replaced by some string it returned and it worked... Why ? -- Georges KO Alcatel Telecom Taiwan gko@alcatel.com.tw / gko@gko.net Cycle 78, year 16 (Ji-Mao), month 11 (Bing-Zi), day 16 (Ji-You)