Subject: Re: bug report: symbolic-ref --short command echos the wrong text while use Chinese language

From: Junio C Hamano <[email-masked]>
Date: Mon, 13 Feb 2023 22:45:07 -0800

Eric Sunshine <[email-masked]> writes:

> 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-<.