[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Codepages and shell function on w32
From: |
Lennart Borgman (gmail) |
Subject: |
Codepages and shell function on w32 |
Date: |
Sun, 31 Dec 2006 14:22:09 +0100 |
User-agent: |
Thunderbird 1.5.0.9 (Windows/20061207) |
I do not know how to solve the problem with the code pages and the shell
function on w32, but played a bit with it. There are actually functions
to get the code pages and I tested this at the end of the shell function:
(shell-mode)
(when (eq system-type 'windows-nt)
(let ((shell-file-name prog)
(proc (get-buffer-process (current-buffer)))
(fullprog (executable-find prog))
(cp-out (read (format "cp%s"
(w32-get-console-output-codepage))))
(cp-in (read (format "cp%s" (w32-get-console-codepage)))))
(cond
((w32-shell-dos-semantics)
(set-process-coding-system proc cp-out cp-in))
((string-match "/msys/" fullprog)
(message "think it is MSYS...")
;; MSYS: fix-me, does not work
(set-process-coding-system proc 'windows-1252 'windows-1252))
((string-match "/cygwin/" fullprog)
(message "think it is Cygwin...")
;; Cygwin: fix-me, does not work
(set-process-coding-system proc 'windows-1252 'windows-1252))
(t
(message "unrecognized shell program: %s" fullprog))
)))))
buffer)
It seems to work for cmdproxy, but I do not know how the code should
look. I do not know what code pages to use for MSYS and Cygwin, the code
above is just a test.
- Codepages and shell function on w32,
Lennart Borgman (gmail) <=