powershell
小于 1 分钟windows
解决乱码
- 配置
git,告诉它应该如何输出中文
git config --global core.quotepath false
git config --global gui.encoding utf-8
git config --global i18n.commit.encoding utf-8
git config --global i18n.logoutputencoding utf-8
- 以管理员身份打开
powershell执行命令chcp 65001 - 在
powershell中执行下面命令:先检查是否有配置文件,如果没有则创建并打开
if (!(Test-Path $PROFILE)) { New-Item -Path $PROFILE -ItemType File -Force }
notepad $PROFILE
拷贝下面代码到配置文件并保存
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
- 重新打开
powershell验证上面的配置是否生效
