现在不得不在Win下用Emacs,但是遇到一些.log文件是乱码。如
CPU时间 1.17秒
显示为:
CPU \312\261\274\344 1.17 \303\353
直接复制到Emacs(utf-8)是这样的:
CPU ʱ¼ä 1.17 Ãë
这些.log是配置好的环境运算过程产生的,我最多只能调用Emacs执行,但不能修改已有配置。
请问,在Emacs里,不改动其他编码(utf-8)的情况下,如何找到这些 .log文件的正确编码,并设置打开这些文件就自动切换。
谢谢!
当前describe-coding-system
是这样的:
Particular coding systems specified for certain file names:
OPERATION TARGET PATTERN CODING SYSTEM(s)
--------- -------------- ----------------
File I/O "\\.tzst\\'" (no-conversion . no-conversion)
"\\.zst\\'" (no-conversion . no-conversion)
"\\.dz\\'" (no-conversion . no-conversion)
"\\.txz\\'" (no-conversion . no-conversion)
"\\.xz\\'" (no-conversion . no-conversion)
"\\.lzma\\'" (no-conversion . no-conversion)
"\\.lz\\'" (no-conversion . no-conversion)
"\\.g?z\\'" (no-conversion . no-conversion)
"\\.\\(?:tgz\\|svgz\\|sifz\\)\\'"
(no-conversion . no-conversion)
"\\.tbz2?\\'" (no-conversion . no-conversion)
"\\.bz2\\'" (no-conversion . no-conversion)
"\\.Z\\'" (no-conversion . no-conversion)
"\\.elc\\'" utf-8-emacs
"\\.el\\'" prefer-utf-8
"\\.utf\\(-8\\)?\\'" utf-8
"\\.xml\\'" xml-find-file-coding-system
"\\(\\`\\|/\\)loaddefs.el\\'"
(raw-text . raw-text-unix)
"\\.tar\\'" (no-conversion . no-conversion)
"\\.po[tx]?\\'\\|\\.po\\."
po-find-file-coding-system
"\\.\\(tex\\|ltx\\|dtx\\|drv\\)\\'"
latexenc-find-file-coding-system
"" (undecided)
Process I/O "[pP][lL][iI][nN][kK]" (undecided-dos . undecided-dos)
"[cC][mM][dD][pP][rR][oO][xX][yY]"
(undecided-dos . undecided-dos)
Network I/O nothing specified