git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Konstantin KhomoutovNext: Kazuhiro Kato via GitGitGadget
Message 4 of 7 in “gitk: Fixing file name encoding issues.”
  1. 0/2 gitk: Fixing file name encoding issues.Kazuhiro Kato via GitGitGadget, Feb 18, 2025
  2. 1/2 Fixing file name encoding issues.Kazuhiro Kato via GitGitGadget, Feb 18, 2025
  3. Konstantin KhomoutovFeb 19, 2025
  4. Junio C HamanoFeb 19, 2025
  5. 2/2 fix: when resolving merge conflicts, japanese file names become garbled.Kazuhiro Kato via GitGitGadget, Feb 18, 2025
  6. Junio C HamanoFeb 19, 2025
  7. Junio C HamanoFeb 18, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.