# Chinese characters are garbled, setting utf-8 is also garbled

3 messages from 2020-08-01 to 2020-08-02. Participants: Nicholas Hsiang, brian m. carlson.
Thread: https://gitlist.dev/t/53959

## Nicholas Hsiang, 2020-08-01 04:36

Subject: Chinese characters are garbled, setting utf-8 is also garbled
Message-ID: <CAEcaDL=BrqFf7bwJ0cVWK-+vUKLmuihhKr8m0_w2CCSNfA9LEw@mail.gmail.com>
URL: https://gitlist.dev/e/CAEcaDL%3DBrqFf7bwJ0cVWK-%2BvUKLmuihhKr8m0_w2CCSNfA9LEw%40mail.gmail.com

```
Hi,

There are some problems here.

I have configured the character encoding in .gitconfig:

ˋˋˋyaml
[core]
  quotepath = false
[gui]
  encoding = utf-8
[i18n]
  commitencoding = utf-8
  logoutputencoding = utf-8
ˋˋˋ

and Git Bash configed: Options > Text > Locale: zh_CN, Character set: UTF-8

However, when executing `git pull/reset/status`, Chinese characters
still appeared garbled.

ˋˋˋbash
Xiang@Xiang MINGW64 /c/me/front-end-note (master)
$ git reset --hard df576e2
HEAD is now at df576e2 doc: 琛ュ厖 ES5 缁ф壙
ˋˋˋ

`git pull`:

ˋˋˋbash
Xiang@Xiang MINGW64 /c/me/front-end-note (master)
$ git pull
Updating df576e2..bd2894b
Fast-forward
 AngularJS/assets/AngularJS-Component-LifeCycle.png | Bin 0 -> 154433 bytes
 AngularJS/chapter/Components.md                    |   2 +
 AngularJS/chapter/Scopes.md                        |  18 ++-
 ESLint.md                                          | 118 ++++++++++++++
 NPM.md                                             | 173 +++++++++++++--------
 React/Context.md                                   |   3 +
 React/Refs.md                                      |  47 ++++++
 React/react-architecture.png                       | Bin 0 -> 56624 bytes
 React/react-lifecycle-methods-diagram.png          | Bin 0 -> 41677 bytes
 React/鍗忚皟.md                                    |  33 ++++
 i18n 瑙ｅ喅鏂规.md                               |  76 +++++++++
 浠ｇ爜鐩綍鏂囦欢缁撴瀯.md                        |  15 ++
 娣卞叆鐞嗚ВES6/9.JavaScript涓殑绫?md           |  13 +-
 13 files changed, 426 insertions(+), 72 deletions(-)
 create mode 100644 AngularJS/assets/AngularJS-Component-LifeCycle.png
 create mode 100644 ESLint.md
 create mode 100644 React/Context.md
 create mode 100644 React/Refs.md
 create mode 100644 React/react-architecture.png
 create mode 100644 React/react-lifecycle-methods-diagram.png
 create mode 100644 React/鍗忚皟.md
 create mode 100644 i18n 瑙ｅ喅鏂规.md
 create mode 100644 浠ｇ爜鐩綍鏂囦欢缁撴瀯.md
ˋˋˋ

`git status`:

ˋˋˋbash
Xiang@Xiang MINGW64 /c/me/front-end-note (master)
$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   浜夎涓庢帰绱?md

no changes added to commit (use "git add" and/or "git commit -a")
ˋˋˋ

`git log` command is correct:

ˋˋˋbash
Xiang@Xiang MINGW64 /c/me/front-end-note (master)
$ git log --oneline -3
bd2894b (HEAD -> master, origin/master) i18n
73dceea 代码目录文件结构
89121aa 更新 NPM
ˋˋˋ

My environment:

- windows 10 home chinese edition
- git version 2.28.0.windows.1

This problem did not appear in the previous version, and we look
forward to fixing it.

Thanks

Xiang 2020/8/1
-- 
Live Long and Prosper.

```

## brian m. carlson, 2020-08-02 01:28

Subject: Re: Chinese characters are garbled, setting utf-8 is also garbled
Message-ID: <20200802012802.GK6540@camp.crustytoothpaste.net>
URL: https://gitlist.dev/e/20200802012802.GK6540%40camp.crustytoothpaste.net
In-Reply-To: <CAEcaDL=BrqFf7bwJ0cVWK-+vUKLmuihhKr8m0_w2CCSNfA9LEw@mail.gmail.com>

```
On 2020-08-01 at 04:36:50, Nicholas Hsiang wrote:
> Hi,
> 
> There are some problems here.
> 
> I have configured the character encoding in .gitconfig:
> 
> ˋˋˋyaml
> [core]
>   quotepath = false
> [gui]
>   encoding = utf-8
> [i18n]
>   commitencoding = utf-8
>   logoutputencoding = utf-8
> ˋˋˋ
> 
> and Git Bash configed: Options > Text > Locale: zh_CN, Character set: UTF-8
> 
> However, when executing `git pull/reset/status`, Chinese characters
> still appeared garbled.
> 
> ˋˋˋbash
> Xiang@Xiang MINGW64 /c/me/front-end-note (master)
> $ git reset --hard df576e2
> HEAD is now at df576e2 doc: 琛ュ厖 ES5 缁ф壙
> ˋˋˋ

Since this is a Windows issue, you'd be better off reporting this at the
Git for Windows issue tracker at
https://github.com/git-for-windows/git/issues/.  As far as what I've
seen in your email, the characters do appear to be in Chinese, although
since I don't speak or read that language, I don't know whether they
make any sense or are garbled.
-- 
brian m. carlson: Houston, Texas, US

```

## Nicholas Hsiang, 2020-08-02 04:17

Subject: Re: Chinese characters are garbled, setting utf-8 is also garbled
Message-ID: <CAEcaDL=DOn8d=L0Db41o--vOzjSzxVxsDTX9poXHTHHwBV0SCQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAEcaDL%3DDOn8d%3DL0Db41o--vOzjSzxVxsDTX9poXHTHHwBV0SCQ%40mail.gmail.com
In-Reply-To: <20200802012802.GK6540@camp.crustytoothpaste.net>

```
I submit an issue with them, Thanks for the tip!
:)
--
xiang hong ai: ChangSha, HuNan, CN

brian m. carlson <sandals@crustytoothpaste.net> 于2020年8月2日周日 上午9:28写道：
>
> On 2020-08-01 at 04:36:50, Nicholas Hsiang wrote:
> > Hi,
> >
> > There are some problems here.
> >
> > I have configured the character encoding in .gitconfig:
> >
> > ˋˋˋyaml
> > [core]
> >   quotepath = false
> > [gui]
> >   encoding = utf-8
> > [i18n]
> >   commitencoding = utf-8
> >   logoutputencoding = utf-8
> > ˋˋˋ
> >
> > and Git Bash configed: Options > Text > Locale: zh_CN, Character set: UTF-8
> >
> > However, when executing `git pull/reset/status`, Chinese characters
> > still appeared garbled.
> >
> > ˋˋˋbash
> > Xiang@Xiang MINGW64 /c/me/front-end-note (master)
> > $ git reset --hard df576e2
> > HEAD is now at df576e2 doc: 琛ュ厖 ES5 缁ф壙
> > ˋˋˋ
>
> Since this is a Windows issue, you'd be better off reporting this at the
> Git for Windows issue tracker at
> https://github.com/git-for-windows/git/issues/.  As far as what I've
> seen in your email, the characters do appear to be in Chinese, although
> since I don't speak or read that language, I don't know whether they
> make any sense or are garbled.
> --
> brian m. carlson: Houston, Texas, US



-- 
Live Long and Prosper.

```
