Re: [PATCH 1/2] Fixing file name encoding issues.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 19, 2025, 18:02 UTC
- Message-ID
- <xmqqmsehg6ea.fsf@gitster.g>
- In-Reply-To
- <20250219173032.x5gzw6hsvsu4flba@carbon>
Konstantin Khomoutov <kostix@bswap.ru> writes:
Show 23 quoted lines
> On Tue, Feb 18, 2025 at 10:42:25PM +0000, Kazuhiro Kato via GitGitGadget wrote:
>
> [...]
>> diff --git a/gitk-git/gitk b/gitk-git/gitk
>> index 47a7c1d29c4..88951ed2384 100755
>> --- a/gitk-git/gitk
>> +++ b/gitk-git/gitk
>> @@ -12379,6 +12379,7 @@ catch {
>> if {$gitencoding == ""} {
>> set gitencoding "utf-8"
>> }
>> +encoding system utf-8
>> set tclencoding [tcl_encoding $gitencoding]
>> if {$tclencoding == {}} {
>> puts stderr "Warning: encoding $gitencoding is not supported by Tcl/Tk"
>
> I'm not sure one should sensibly do this - except to implement some
> well-understood and well-documented kludge, simply because the "system
> encoding" is supposed to be set by the Tcl runtime.
> ...
> In other words, your patch (supposedly) works on UTF-8-based systems
> which is common to Linux-based OSes and MacOS, but I'm afraid it won't work on
> Windows.In other words, things should work without "encoding system blah" forcing a particular encoding that Tcl may not agree with? Would this mean perhaps in a "curious" repository with paths encoded in something Tcl does not expect to be used (e.g., on a UTF-8 system somehow EUC-jp is used for paths containing Japanese characters), it needs to be possible to specify a "curious" encoding either with an end-user on-demand action (e.g., menu items) or with an repository configuration (e.g., gitk.pathencoding = euc-jp)?
Thanks.