emacs - 如何修复 aHg 输出编码?

标签 emacs mercurial

这是我使用的: - MacOS X 10.6.7
- GNU bash,版本 3.2.48(1)-release (x86_64-apple-darwin10.0)
- Mercurial分布式SCM(版本1.7.2+20101201)
- GNU Emacs 24.0.50(使用 --cocoa 标志从 git repo 构建)
-aHg v0.99

这是我的 emacs 设置:

(set-default-coding-systems 'utf-8)
(prefer-coding-system 'utf-8)
(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(set-language-environment 'UTF-8)

如果我在 C-c h g s 之后得到什么:

parent: 2512:6252abcd7368 tip
 JavaScript: ???????? ???????????? ????? ? ???????.
branch: default
commit: 3 modified, 6 unknown
update: (current)

M-x term 下运行 hg log 给我一个我可以阅读的正确结果(? 是俄语字符...)。那么...如何在 Emacs 中以 aHg 输出修复此问题?

最佳答案

首先,应该在此处检查 - 启动 Emacs 时设置了哪个 LANG)? (执行 M-: (getenv "LANG") 时返回什么?我记得,Mac OS X 在启动板启动时将 LANG 设置为“C”...语言环境设置不'修改LANG...

您可以使用 (setenv "LANG""ru_RU.UTF-8") 在 Emacs 中显式设置 LANG 环境,或者如果需要的话使用“en_EN.UTF-8”。

附言我刚刚用不同的 LANG 设置检查了 ahg,当我将 LANG 设置为“C”时看到了问号,当我在存储库中运行 ahg-log 时看到了俄文字母

关于emacs - 如何修复 aHg 输出编码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5894108/

相关文章:

python - 使用 yasnippet、Emacs 在 python 模式下缩进错误

emacs - 如何在 Emacs Lisp 中复制到剪贴板

xcode - 从 Emacs 过渡到 Xcode 的提示

version-control - 对于二进制文件,我应该使用 bfiles 还是 bigfiles?

mercurial - 乌龟 Mercurial : how to get notified whe something pushed to a central repo

emacs - 仅在某些模式下的行号

Emacs:Bernt Hansen 的明文生活 - 示例 git repo?

mercurial - 如何在命令提示符下使用HG(Mercurial)?

mercurial - 如何加入两个不相关的存储库?

linux - 如何以人类可读的格式(最好使用 kdiff3)打开 (Mercurial) 补丁文件?