[Mew-dist 294] Re: multiple charsets

Murata Shuuichirou mrt at example.com
1996年 12月 13日 (金) 21:15:26 JST


In message <19961210235721F.shuhei-k at example.com>,
 Shuhei KOBAYASHI <shuhei-k at example.com> wrote:
> >>>>> In <19961210230751A.mrt at example.com>,
> >>>>> Murata Shuuichirou <mrt at example.com> wrote:
> > これだとこんどは ISO-2022-JP-2 がつけられなくなるので、それはそれで
> > コマルのではないでしょうか。
> 
>   あ、そうですね。どの程度需要があるのかはともかく、ISO-2022-JP-2 で
> 
>       reg#  character set      ESC sequence                designated to
>       ------------------------------------------------------------------
>       58    GB2312-1980        ESC 2/4 4/1      ESC $ A    G0
>       149   KSC5601-1987       ESC 2/4 2/8 4/3  ESC $ ( C  G0
>       100   ISO8859-1          ESC 2/14 4/1     ESC . A    G2
>       126   ISO8859-7(Greek)   ESC 2/14 4/6     ESC . F    G2
> 
> を出力できなくなりますね。

わたし自身はけっこう使いますよ。ISO8859-1 を入れたいことはよくあります
から。

# あと補助漢字とか

> #Mew が ISO-2022-KR な世界でも使われるならば、default は iso-2022-int-*
> #の方が良いと思います。

これはそのとおりだと思います。

> > part ごとに自前で encode しておいて、no conversion で save しないとう
> > まくゆかないでしょうね。ひまができたらためしてみます。
> 
> どのような場合でもうまくいくようにするためにはこのようにするしかないと
> 思います。

やってみました。わりとすくない修正でそれらしくなっちゃったので、かえっ
て不安です:-) 興味のあるひとはつかってみてください。

mule-19.33-delta用 のコードを含むのでお気をつけください。

# というか実は mule-19.33-delta でしか試してないので mule2.3 では動か
# なかったりするかもしれません。

まかりまちがって内部コードでメールを出しちゃう可能性もあるので、それに
もお気をつけください。
-- 
むらたしゅういちろう
-------------- next part --------------
diff -ur mew-1.54+m24/mew-charset.el mew-1.54/mew-charset.el
--- mew-1.54+m24/mew-charset.el	Fri Dec 13 18:10:15 1996
+++ mew-1.54/mew-charset.el	Fri Dec 13 21:06:38 1996
@@ -133,7 +133,6 @@
 
 (cond
  (mew-mule24-p
-  (defvar mew-mule-charset-mime-trans   'coding-system-iso-2022-ss2-7) 
   (defvar mew-mule-charset-rfc822-trans 'coding-system-iso-2022-ss2-7) 
   (defvar mew-mule-charset-draft        'coding-system-iso-2022-jp)
   (defvar mew-mule-charset-scan         'coding-system-iso-2022-jp)
@@ -145,7 +144,6 @@
   ;; ^M as it is
   )
  (mew-mule-p
-  (defvar mew-mule-charset-mime-trans   *iso-2022-ss2-7*) 
   (defvar mew-mule-charset-rfc822-trans *iso-2022-ss2-7*) 
   (defvar mew-mule-charset-draft        *iso-2022-jp*)
   (defvar mew-mule-charset-scan         *iso-2022-jp*) ;; *iso-2022-ss2-7*
@@ -164,8 +162,7 @@
     (list
      (list mew-prog-inc 'process mew-mule-charset-scan)
      (list mew-prog-scan 'process mew-mule-charset-scan)
-     (list mew-prog-send 'process
-	   'no-conversion mew-mule-charset-mime-trans)
+     (list mew-prog-send 'process 'no-conversion 'no-conversion)
      (list mew-prog-pick 'process mew-mule-charset-scan)
      (list mew-prog-mime-encode 'process 'no-conversion)
      (list mew-prog-mime-decode 'process 'no-conversion)
@@ -175,8 +172,7 @@
  (mew-mule-p
   (define-program-coding-system nil mew-prog-inc  mew-mule-charset-scan)
   (define-program-coding-system nil mew-prog-scan mew-mule-charset-scan)
-  (define-program-coding-system nil mew-prog-send 
-    (cons *noconv* mew-mule-charset-mime-trans))
+  (define-program-coding-system nil mew-prog-send (cons *noconv* *noconv*))
   (define-program-coding-system nil mew-prog-pick mew-mule-charset-scan)
   (define-program-coding-system nil mew-prog-mime-encode *noconv*)
   (define-program-coding-system nil mew-prog-mime-decode *noconv*)
diff -ur mew-1.54+m24/mew-draft.el mew-1.54/mew-draft.el
--- mew-1.54+m24/mew-draft.el	Fri Dec 13 18:10:15 1996
+++ mew-1.54/mew-draft.el	Fri Dec 13 18:49:16 1996
@@ -549,8 +549,8 @@
 	 (delete nil))
     (set-buffer-modified-p t)		; Make sure buffer is written
     (let ((file-coding-system
-	   (if (and mew-mule-p (not mew-mule24-p)) mew-mule-charset-mime-trans))
-	  (coding-system-for-write (if mew-mule24-p mew-mule-charset-mime-trans)))
+	   (if (and mew-mule-p (not mew-mule24-p)) *noconv*))
+	  (coding-system-for-write (if mew-mule24-p 'no-conversion)))
       (save-buffer)
       )
     ;; make backup folder(s)
diff -ur mew-1.54+m24/mew-encode.el mew-1.54/mew-encode.el
--- mew-1.54+m24/mew-encode.el	Fri Dec 13 18:10:15 1996
+++ mew-1.54/mew-encode.el	Fri Dec 13 20:48:31 1996
@@ -217,7 +217,11 @@
 	  ;; Probably 7bit text based object like phantom body of 
 	  ;; message/external-body. file-coding-system-for-read is not 
 	  ;; necessary.
-	  (insert-file-contents file)))
+	  (let ((file-coding-system-for-read
+		 (if (and mew-mule-p (not mew-mule24-p)) *noconv*) )
+		(coding-system-for-read
+		 (if mew-mule24-p 'no-conversion) ))
+	  (insert-file-contents file) )))
     ;; Go to RFC1847 privacy services.
     ;; RFC1847 and services using it such as RFC1848 MOSS and Elkins PGP/MIME
     ;; allows 8bit/binary MIME canonical form(i.e. 7bit content-header and 
@@ -255,6 +259,13 @@
 	      (mew-encode-multipart-signed ct protocol depth))
 	     )
 	    ))))
+    (let ((charsym (if (and charset mew-mule-p)
+		       (mew-charset-to-symbol charset))))
+      (and charsym
+	  (cond (mew-mule24-p
+		 (encode-coding-region beg (point-max) charsym))
+		(mew-mule-p
+		 (code-convert-region beg (point-max) *internal* charsym) ))))
     (goto-char (point-max))
     ))
 


Mew-dist メーリングリストの案内