Re: bug report: symbolic-ref --short command echos the wrong text while use Chinese language
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 14, 2023, 06:45 UTC
- Message-ID
- <xmqq3578924s.fsf@gitster.g>
- In-Reply-To
- <CAPig+cQx24PRUsEjEcnuDtokS02SS3n_dUi8MO=WJbBazget8g@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 11 quoted lines
> Using (presumably) valid LANG codes results in the buggy truncated > output, but "LANG=C" produces the correct result: > > $ for i in C en_US fr_FR de_DE ru_RU zh_CN; do printf "$i: " && > LANG=$i.UTF-8 git symbolic-ref --short HEAD; done > C: 测试-加-增加-加-增加 > en_US: 测试-? > fr_FR: 测试-? > de_DE: 测试-? > ru_RU: 测试-? > zh_CN: 测试-?
Interesting.
So the system cares more than just "is this a valid UTF-8 sequence?" but somehow knows that the given sequence is a valid Chinese and not valid English? ---oh, no, zh_CN is rejected, but your earlier zh-CN somehow was accepted?
Now, it is beyond my ability to guess what macOS is internally doing wrong X-<.