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, 05:40 UTC
- Message-ID
- <xmqq7cwk955b.fsf@gitster.g>
- In-Reply-To
- <CAPig+cT5mORvJt_E+uDYEVW+SYbUp_1U8hmjWT8iUkjzOnJm=A@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 7 quoted lines
> sscanf() seems to be the culprit. If I set LANG, then I get the same > result as you get: > > $ LANG=zh-CN.UTF-8 git symbolic-ref --short HEAD > warning: strlen(refname) = 39 > warning: strlen(short_name) = 28 > 测试-加-增加-加-增加
Well, that's ... criminal.
I wonder if LANG=$ANY_VALID_ONE.UTF-8 would work the same way.