OSX 10.7.5 UTF-8 encoding over ssh

こ雲淡風輕ζ 提交于 2019-12-25 13:46:31

问题


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

but on Mac it gives error

"Couldn't copy terminal settings"

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?


回答1:


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.

I suggest that you grab the upstream sources and recompile with posix_openpt disabled.



来源:https://stackoverflow.com/questions/23015650/osx-10-7-5-utf-8-encoding-over-ssh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!