我使用xterm (X-Win32 2012 Build 30 from StarNet Communications Corp) 从 Windows 7 PC 登录到 Red Enterprise Linux 6 (RHEL6)。
我的问题是所有多字节 utf-8 字符在 xterm 登录 shell 中都出现乱码。例如,以下是字符串 "Wilhelm Röntgen" 在两个 shell 实例中的呈现方式(使用的字体是 Unicode 字体,并且在两个 shell 实例中使用相同的字体):
Login shell: Wilhelm Röntgen
Second shell: Wilhelm Röntgen
Run Code Online (Sandbox Code Playgroud)
如果我理解正确的话,来自 rom StarNet Communications Corp 的软件会实现(或模拟)一个 X 终端(一个运行 X 服务器的瘦客户端)。即两个 shell 实例都在 PC 上的 X 终端窗口中运行,并使用 X11 协议与 RHEL6 通信。下面是两个 shell 如何出现在我的桌面上,将带有 unicode multibye 字符的文件连接到终端。

这是我配置 X-Win32 用于启动登录 shell 的命令:
xterm -u8 -ls
Run Code Online (Sandbox Code Playgroud)
但是,在我登录后,我可以 …
我有希腊或西里尔字符的文件。
它不归我所有,而是归 Web 服务器用户 (www) 所有。
我不能以 web 服务器用户 (www) 或 root 身份使用 shell,但我使用了一个脚本(由 web 服务器用户执行)将它所在的 modbits 目录设置为 777,并将文件本身设置为 666。
我无法重命名(或删除此)文件。即使使用 inode 并使用find失败:
$ ls -i1
19120017 Idezbox - ???????.jpeg
$ find . -inum 19120017 -exec mv -i {} sane \;
mv: cannot move `./Idezbox - ???????.jpeg' to `sane': No such file or directory
Run Code Online (Sandbox Code Playgroud)
通配符失败:
$ mv Idezbox*.jpeg sane
mv: cannot move `Idezbox - ???????.jpeg' to `sane': No such file or directory
Run Code Online (Sandbox Code Playgroud)
以下 Perl 脚本也失败:
find . -type …Run Code Online (Sandbox Code Playgroud)