日本語ファイル名の再生 (was Re: insecure tempfile problem)

[email protected] (ARISAWA Akihiro)
Newsgroups gmane.mail.emacs.mime.japanese
Message-ID <m31xrakupo.wl%[email protected]>
>>>>> In [emacs-mime-ja : No.01570] 
>>>>>	Yuuichi Teranishi <[email protected]> wrote:

> あと、よくわかってなくて判断つかないのですが、
> http://lists.airs.net/wl/archive/200305/msg00009.html                
> は、あててよいものでしょうか?

;; emacs-mime-ja に投げようと思いながらもすっかり忘れていました。

call-process では process への入力の coding-system で引数がエンコード
されるため、binary-to-text-funcall の中で呼ぶと coding-system-for-write
が binary に束縛され、ファイル名がエンコードされずに渡ってしまうようです。

mime-activate-mailcap-method では作成したプロセスにデータを送ることも
無いので、coding-system-for-write は束縛する必要はないと思います。

反対がなければ日曜日くらいに commit しようと思いますがいかがでしょうか。

-- 
有沢 明宏
mime-play.el.patch (text/plain, 918 B)
Index: mime-play.el
===================================================================
RCS file: /cvs/root/semi/mime-play.el,v
retrieving revision 1.85.2.9
diff -u -r1.85.2.9 mime-play.el
--- mime-play.el	8 Feb 2003 08:05:56 -0000	1.85.2.9
+++ mime-play.el	7 May 2003 11:39:50 -0000
@@ -152,10 +152,9 @@
 	   (let ((command
 		  (mime-format-mailcap-command
 		   method
-		   (cons (cons 'filename name) situation))))
-	     (binary-to-text-funcall
-	      mime-play-messages-coding-system
-	      #'start-process command mime-echo-buffer-name
+		   (cons (cons 'filename name) situation)))
+                 (coding-system-for-read mime-play-messages-coding-system))
+	     (start-process command mime-echo-buffer-name
 	      shell-file-name shell-command-switch command))))
       (set-alist 'mime-mailcap-method-filename-alist process name)
       (set-process-sentinel process 'mime-mailcap-method-sentinel))))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.