【问题标题】:Why can't my Android Studio terminal display Chinese characters?为什么我的 Android Studio 终端不能显示汉字?
【发布时间】:2017-12-16 05:36:54
【问题描述】:

在终端使用git命令时,为什么汉字显示不正常?

这是一个例子:

【问题讨论】:

    标签: git android-studio terminal


    【解决方案1】:

    首先,将以下行添加到 ~/.bash_profile:

    export LANG=en_US.UTF-8
    

    最后,重启你的 IDE

    【讨论】:

      【解决方案2】:

      可能是字体问题。

      在 Android Studio 中,尝试转到 Settings > Editor > Console Font,然后在 Primary Font 下拉列表中尝试选择其他字体。 (您可能需要Save As 自定义方案来选择非默认字体。)

      在我的 Mac 上,Menlo 字体显示汉字git log OK。

      【讨论】:

        【解决方案3】:

        我也遇到过这个问题。只需将我的终端语言环境更改为en_US.UTF-8,此问题就消失了。希望我的解决方法对您有所帮助。

        【讨论】:

          【解决方案4】:

          将此行添加到 ~/.bash_profile 或 ~/.zshrc

          export LANG=en_US.UTF-8
          

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 2020-06-04
            • 2020-06-28
            • 2023-03-25
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            相关资源
            最近更新 更多