git log 亂碼

This commit is contained in:
Cody Zhang
2020-06-12 18:53:59 +08:00
parent 1114d0c6ca
commit 45079d5f7d
4 changed files with 21 additions and 0 deletions

BIN
images/utf8_01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
images/utf8_02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
images/utf8_03.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

21
log_utf8.md Normal file
View File

@@ -0,0 +1,21 @@
### git log 亂碼
![git log 亂碼](images/utf8_01.png)
#### 解決方法
設定環境變數 LC_ALL=C.UTF-8
Command Prompt
```cmd
set LC_ALL=C.UTF-8
```
Powershell
```powershell
$env:LC_ALL=C.UTF-8
```
![git log 正常](images/utf8_03.png)
#### 永久有效設定
![environment variable setting](images/utf8_02.png)