最近装了台ubuntu server做虚拟机,与字符集有关的各种配置都选用了utf8.
ssh连接上去之后,在shell中无法输入中文,复制粘贴也不行,SecureCRT和Bitvise Xterm都是如此。putty没有试过。
在vim中却可以输入中文,写代码虽然不受影响,但是要在shell中grep/ack的时候就有点郁闷 。
一次偶然的机会,为了解决perl 对于locale的报错, 竟然搞定了这个问题。
modify@ubuntu:~/apps/6$ ack "template_c" -w perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "zh_CN:zh", LC_ALL = (unset), LC_PAPER = "zh_CN", LC_ADDRESS = "zh_CN", LC_MONETARY = "zh_CN", LC_NUMERIC = "zh_CN", LC_TELEPHONE = "zh_CN", LC_IDENTIFICATION = "zh_CN", LC_MEASUREMENT = "zh_CN", LC_TIME = "zh_CN", LC_NAME = "zh_CN", LANG = "zh_CN.UTF-8" are supported and installed on your system. perl: warning: …[获取更多]