Git Mailing List Archive on lore.kernel.org
 help / color / Atom feed
From: Nicholas Hsiang <xianghongai@gmail.com>
To: git@vger.kernel.org
Subject: Chinese characters are garbled, setting utf-8 is also garbled
Date: Sat, 1 Aug 2020 12:36:50 +0800
Message-ID: <CAEcaDL=BrqFf7bwJ0cVWK-+vUKLmuihhKr8m0_w2CCSNfA9LEw@mail.gmail.com> (raw)

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 瑙e喅鏂规.md                               |  76 +++++++++
 浠g爜鐩綍鏂囦欢缁撴瀯.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 瑙e喅鏂规.md
 create mode 100644 浠g爜鐩綍鏂囦欢缁撴瀯.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.

             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-01  4:36 Nicholas Hsiang [this message]
2020-08-02  1:28 ` brian m. carlson
2020-08-02  4:17   ` Nicholas Hsiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEcaDL=BrqFf7bwJ0cVWK-+vUKLmuihhKr8m0_w2CCSNfA9LEw@mail.gmail.com' \
    --to=xianghongai@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Mailing List Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/git/0 git/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 git git/ https://lore.kernel.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.git


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git