調べたりしたポイントだけメモ。
前提:
Windows Vista
Cygwin 1.7
NTEmacs 22.2.1
管理するソースコードの文字コードはEUCです。
M-x svn-status
でNTEmacsからdsvnを起動すると出るwarning。
svn: warning: cannot set LC_CTYPE localeこれは、環境変数LC_CTYPEを ja_JP.eucJP に設定すれば解消しました。
svn: warning: environment variable LC_CTYPE is ja_JP.EUC-JP
svn: warning: please check that your locale name is correct
svn-diffなどで差分表示すると・・・
日本語が文字化けする件は、
dsvnが文字コードをUTF-8で扱っているのが原因のようです。
dsvn.elの utf-8 になっている以下の2カ所を euc-jp-unix へ置き換えると解決しました。
(defun svn-call-process (program buffer &rest args)
"Run svn and wait for it to finish.
Argument PROGRAM is the svn binary to run.
Argument BUFFER is the buffer in which to insert output.
Optional argument ARGS are the arguments to svn."
(let ((proc (apply 'start-process "svn" buffer program args)))
; (set-process-coding-system proc 'utf-8)
(set-process-coding-system proc 'euc-jp-unix)
(set-process-filter proc 'svn-output-filter)
(while (eq (process-status proc) 'run)
(accept-process-output proc 5)
(sit-for 0))))
(defun svn-run-with-output (subcommand &optional args mode)
"Run 'svn' with output to another window.
Argument SUBCOMMAND is the command to execute.
Optional argument ARGS is a list of the arguments to the command.
Optional argument MODE is the major mode to use for the output buffer.
Return non-NIL if there was any output."
(let ((buf (get-buffer-create "*svn output*"))
(dir default-directory)
(inhibit-read-only t))
(with-current-buffer buf
(erase-buffer)
(if mode
(funcall mode)
(fundamental-mode))
(setq default-directory dir)
(setq buffer-read-only t)
(let ((cmd `(,svn-program ,subcommand ,@args))
proc)
(setq proc (apply 'start-process "svn" buf cmd))
; (set-process-coding-system proc 'utf-8)
(set-process-coding-system proc 'euc-jp-unix)
これでソース管理の環境ができた。満足です



