OS X Terminal UTF-8 issues

后端 未结 11 2269
忘了有多久
忘了有多久 2020-11-27 14:56

Okay, so I finally got myself a MacBook Air after 15 years of linux. And before I got it my big concern was UTF-8 support because no matter if I get files sent to me from wi

11条回答
  •  野性不改
    2020-11-27 15:43

    Since nano is a terminal application. I guess it's more a terminal problem than a nano problem.

    I met similar problems at OS X (I cannot input and view the Chinese characters at terminal).

    I tried tweaking the system setting through OS X UI whose real effect is change the environment variable LANG.

    So finally I just add some stuff into the ~/.bashrc to fix the problem.

    # I'm Chinese and I prefer English manual
    export LC_COLLATE="zh_CN.UTF-8"
    export LC_CTYPE="zh_CN.UTF-8"
    export LC_MESSAGES="en_US.UTF-8"
    export LC_MONETARY="zh_CN.UTF-8"
    export LC_NUMERIC="zh_CN.UTF-8"
    export LC_TIME="zh_CN.UTF-8"
    

    BTW, don't set LC_ALL which will override all the other LC_* settings.

提交回复
热议问题