coding-system iso-2022-7bit and iso-2022-jp

Mikio Nakajima minakaji @ osaka.email.ne.jp
1999年 11月 25日 (木) 08:15:06 JST


  APEL の pces-xm.el に

  (and (coding-system-property 'iso-2022-jp 'input-charset-conversion)
       (copy-coding-system 'iso-2022-7bit 'iso-2022-jp))
  (and (coding-system-property 'iso-2022-jp-dos 'input-charset-conversion)
       (copy-coding-system 'iso-2022-7bit-dos 'iso-2022-jp-dos)) )

が入っている件ですが、XEmacs 21.2.20 でもこれがトリガーとなって、
ascii が latin-jisx0201 に化けてしまうので、上記の部分を取り去りたいの
ですが、構わないでしょうか?

ちなみに copy-coding-system を止めて、

(make-coding-system
 'iso-2022-jp 'iso2022
 "Coding-system used for communication with mail and news in Japan."
 '(charset-g0 ascii
   short t
   seven t
   ;; input-charset-conversion
   mnemonic "MULE/7bit"
   ))

して iso-2022-jp を作り直しても同様の症状が出ます。

念のため xemacs -q で立ち上げて、再度検証しましたので、*scratch* の評
価結果を付けておきます。見易いように、評価結果に --> を付けておきます。

(emacs-version)
--> "XEmacs 21.2  (beta20) \"Yoko\" [Lucid] (i586-pc-linux, Mule) of Fri Nov 19 1999 on libretto"

(setup-japanese-environment)
--> nil

(save-excursion
  (setq mesg "~/Mail/refile/apel/125") ; Message-Id: <86yabykvl5.fsf @ aqua.ocn.ne.jp>
  (set-buffer (find-file-noselect mesg))
  (find-charset-region (point-min) (point-max)) )
--> (japanese-jisx0208 ascii) ; 元メッセージは latin-jisx0201 を含んでいない。

(featurep 'pces-xm)
--> nil

(with-temp-buffer
  (let ((coding-system-for-read 'binary))
    (insert-file-contents mesg)
    (re-search-forward "^$")
    (forward-line)
    (beginning-of-line)
    (narrow-to-region (point) (point-max))
    (require 'mcharset)
    (decode-coding-region (point-min) (point-max) 'iso-2022-jp-dos)
    (find-charset-region (point-min) (point-max)) ))
--> (japanese-jisx0208 ascii) ; 化けない。


(with-temp-buffer
  (let ((coding-system-for-read 'binary))
    (insert-file-contents mesg)
    (re-search-forward "^$")
    (forward-line)
    (beginning-of-line)
    (narrow-to-region (point) (point-max))
    (require 'mcharset)
    (decode-coding-region (point-min) (point-max) 'iso-2022-jp)
    (find-charset-region (point-min) (point-max)) ))
--> (japanese-jisx0208 ascii) ; 化けない。

(progn
  (and (coding-system-property 'iso-2022-jp 'input-charset-conversion)
       (copy-coding-system 'iso-2022-7bit 'iso-2022-jp))
  (and (coding-system-property 'iso-2022-jp-dos 'input-charset-conversion)
       (copy-coding-system 'iso-2022-7bit-dos 'iso-2022-jp-dos)) )
--> #<coding_system iso-2022-jp-dos>

(with-temp-buffer
  (let ((coding-system-for-read 'binary))
    (insert-file-contents mesg)
    (re-search-forward "^$")
    (forward-line)
    (beginning-of-line)
    (narrow-to-region (point) (point-max))
    (require 'mcharset)
    (decode-coding-region (point-min) (point-max) 'iso-2022-jp-dos)
    (find-charset-region (point-min) (point-max)) ))
--> (latin-jisx0201 japanese-jisx0208 ascii) ; 化けた!


(with-temp-buffer
  (let ((coding-system-for-read 'binary))
    (insert-file-contents mesg)
    (re-search-forward "^$")
    (forward-line)
    (beginning-of-line)
    (narrow-to-region (point) (point-max))
    (require 'mcharset)
    (decode-coding-region (point-min) (point-max) 'iso-2022-jp)
    (find-charset-region (point-min) (point-max)) ))
--> (latin-jisx0201 japanese-jisx0208 ascii) ; 化けた!

-- 
中島幹夫 <minakaji @ osaka.email.ne.jp>
     <minakaji @ pdx.ne.jp> (急ぎのときはこちらへ)
http://www.asahi-net.or.jp/~gy2m-nkjm/




More information about the APEL-ja mailing list