简体   繁体   English

非ASCII远程文件名错误地显示在Emacs中

[英]Non-ascii remote file names incorrectly shown in Emacs dired

Dired seems unable to correctly show characters like "ç" or "í" in filenames when listing remote directories (eg /scpc:myhost:/home/myuser). 当列出远程目录(例如/ scpc:myhost:/ home / myuser)时,Dired似乎无法正确显示文件名中的“ç”或“í”等字符。 It displays "??" 它显示“ ??” for every non-ascii character. 对于每个非ASCII字符。 How can I fix this? 我怎样才能解决这个问题? Is this a dired limitation? 这是一个极限吗?

The worst thing is that many dired-based commands doesn't work with those files (eg file renaming). 最糟糕的是,许多基于Dired的命令不适用于这些文件(例如,文件重命名)。

On the contrary, ibuffer, eshell, and other commands work fine with any remote filename (and display them properly). 相反,ibuffer,eshell和其他命令可以与任何远程文件名一起正常工作(并正确显示它们)。

The problem arises for remote ext3 and ext4 filesystems in different machines, haven't tried other filesystems. 对于未在其他机器上尝试过的不同机器上的远程ext3和ext4文件系统,会出现问题。 I've found this problem in both Emacs versions I have installed: 24.1.50.1 and 23.3. 我在已安装的两个Emacs版本中都发现了此问题:24.1.50.1和23.3。 I've also tried with dired+, same results. 我也尝试过dired +,结果也一样。

You can use: 您可以使用:

(setq tramp-remote-process-environment ())
(add-to-list 'tramp-remote-process-environment "LC_ALL=en_US.utf8" 'append)

For more information about Tramp problems with UTF-8 - see my question 有关UTF-8流浪汉问题的更多信息- 请参阅我的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM