通过SSH的OSX 10.7.5 UTF-8编码 [英] OSX 10.7.5 UTF-8 encoding over ssh
问题描述
我通过ssh连接到远程linux机器,并且当我使用cat命令查看远程文本文件时,看到了错误的编码.它应该显示äöü等,但显示垃圾.我尝试了一个诱饵,
I connect to a remote linux machine over ssh and when I view a remote text file with cat command, I see incorrect incoding. It's supposed to show äöü etc, but shows garbage. I tried a luit trick,
luit -encoding "UTF-8" ssh remotehost
但是在Mac上会显示错误
but on Mac it gives error
"Couldn't copy terminal settings"
这是一个已知问题,显然Apple不会在Lion上修复它.所以我现在被困住了.有哪些替代方案?
Which is a known issue and apparently Apple is not going to fix it on Lion. So I am stuck now. What are the alternatives?
推荐答案
这是Mac OS中的错误,导致使用posix_openpt
打开的pty失败,导致tcsetattr
失败.解决方法是改用openpty
函数.
This is a bug in Mac OS that causes tcsetattr
to fail on ptys opened with posix_openpt
. The workaround is to use the openpty
function instead.
我建议您抓住上游源并在禁用posix_openpt
的情况下重新编译
I suggest that you grab the upstream sources and recompile with posix_openpt
disabled.
这篇关于通过SSH的OSX 10.7.5 UTF-8编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!