Gnus development mailing list
 help / color / mirror / Atom feed
From: Georges KO <gko@gko.net>
Subject: Re: Problems with: 1) French guillemets and Big5 in regexps, 2) QP filename MIME
Date: Thu, 23 Dec 1999 13:45:19 +0800	[thread overview]
Message-ID: <99Dec23.133809gmt+0800.27976@ns.alcatel.com.tw> (raw)
In-Reply-To: Georges KO's message of "Thu, 23 Dec 1999 09:49:25 +0800"

Georges KO <gko@gko.net> 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)




  reply	other threads:[~1999-12-23  5:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-23  1:49 Georges KO
1999-12-23  5:45 ` Georges KO [this message]
1999-12-23  9:53 ` Kai Großjohann
1999-12-23 10:16   ` Georges KO
1999-12-23 11:17     ` Kai Großjohann
1999-12-23 19:28       ` Florian Weimer

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=99Dec23.133809gmt+0800.27976@ns.alcatel.com.tw \
    --to=gko@gko.net \
    /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).