更新Mojave后,突然发现远程连接原来linux服务器,报一个警告:-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory, 最早以为iTerm2不支持最新系统,但去iTerm2官方网站发现最新版本是支持的,无解只能去看字符集问题,iTerm2使用命令locale与Mac自带终端执行locale有区别: 
发现问题后,就设置环境变量调整成一致吧,不管我在~/.bash_profile怎么设置都不会生效,后来在iTerm2偏好设置参数设置里找到了设置的地方如图:
重启运行iTerm2。 |