[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

UTF-8 のプロセス呼び出しで文字化け



森下と申します。

call-process で utf-8 を使用したいのですが、文字化けしてしまいます。
正しくは、どのようにすれば良いでしょうか。

以下を評価して、

(defun ttt-test ()
  (let ((tmp (get-buffer-create "ttt-temp"))
        (coding-system-for-read 'utf-8)
        (coding-system-for-write 'utf-8))
    (set-buffer tmp)
    (erase-buffer)
    (call-process "echo" nil tmp t "1.森")
    (call-process "echo" nil tmp t "2.森下")
    (write-region (point-min) (point-max) "./ttt-temp.txt")
    ))
(ttt-test)

ttt-temp.txt を開くと、

1.森
2.森丁E

となってしまい、2 行目の後半が化けています。

http://www.bookshelf.jp/soft/meadow_8.html の設定済み Meadow を使用し
ており、

(Meadow-version)
"Meadow-3.00-dev (KIKU)"
(emacs-version)
"GNU Emacs 22.0.50.1 (i386-mingw-nt5.1.2600)
 of 2005-10-06 on LUNA"

です。

なおここでの echo は Cygwin の echo が呼ばれています。

よろしくお願いいたします。

--
もりした みんぺい