首页 > 在 git bash 里运行 java 命令,打印出的中文显示乱码

在 git bash 里运行 java 命令,打印出的中文显示乱码

在 win7 中安装的 git 工具。在 git-bash 下执行 java 命令,结果显示如下图

我有尝试按这篇文章操作过,但解决不了我这个问题。

$ git config --global core.quotepath false          # 显示 status 编码
$ git config --global gui.encoding utf-8            # 图形界面编码
$ git config --global i18n.commit.encoding utf-8    # 提交信息编码
$ git config --global i18n.logoutputencoding utf-8  # 输出 log 编码
$ export LESSCHARSET=utf-8

请问如何解决呢?


在gitbash上方的边框上右击鼠标,从菜单中选择设置(或者选项,我现在没开电脑,忘了),里面有关于编码的设置,你选个gbk就可以正常显示了

【热门文章】
【热门文章】