git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: Yuri <yuri@rawbw.com>
Cc: Bagas Sanjaya <bagasdotme@gmail.com>, Jeff King <peff@peff.net>,
	Junio C Hamano <gitster@pobox.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [BUG REPORT] File names that contain UTF8 characters are unnecessarily escaped in 'git status .' messages
Date: Sat, 29 May 2021 11:27:52 +0200	[thread overview]
Message-ID: <20210529092752.kifzqt3haddzgsob@tb-raspi4> (raw)
In-Reply-To: <6fef4b1e-1ec7-b697-c311-59caf6408b29@rawbw.com>

On Thu, May 27, 2021 at 09:45:53PM -0700, Yuri wrote:
> On 5/27/21 9:39 PM, Bagas Sanjaya wrote:
> > So the current default is only supports ASCII, and escape other
> > characters, right?
>
>
> It appears this way.
>

Yes, that is how it is.

After reading the wiki here:

https://wiki.gentoo.org/wiki/UTF-8

(There are many other web pages as well)

I am not sure that there is a reliable way for Git to detect, if the
terminal is capable of handling UTF-8.
This should work reliable under Linux, Windows, Mac and all the supported
Unix-ish platforms.

Beside that, the outputs of git commands can be feed into other programs
via a pipe usning  "|"  on the command line or redirectet to a file.

And what is a terminal ?
We need to consider that we run programs like `less` or `more´ which
need to be UTF-8 compatble.

Most of them are probably UTF-8 compliant (and LANG is set to xx.UTF-8)
these days.
And most repositories have been feed with filenames encoded in  UTF-8 as well.

Having said that, the default could be switched some day in the future.
Before that is "save", there may be a transition phase,
where users are warned that the default may change.
Scripts calling git need to use `git -c core.quotepath=yes`, or no,
whatever input they expect.

Sorry for the longish answer.
Changing one thing for some users may effect hundrets, thousands or millions
of other users later, cause surprises, need debugging and fixing effort.

Does someone wants to come up with a patch that anounces a possible change ?




  reply	other threads:[~2021-05-29  9:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 22:47 [BUG REPORT] File names that contain UTF8 characters are unnecessarily escaped in 'git status .' messages Yuri
2021-05-26 23:32 ` Junio C Hamano
2021-05-26 23:41   ` Yuri
2021-05-27  4:56     ` Torsten Bögershausen
2021-05-27 14:02       ` Jeff King
2021-05-27 20:50         ` Yuri
2021-05-28  4:39           ` Bagas Sanjaya
2021-05-28  4:45             ` Yuri
2021-05-29  9:27               ` Torsten Bögershausen [this message]
2021-05-30 21:44                 ` Jeff King
2021-05-30 21:55                   ` Yuri
2021-05-31  1:14                     ` Thomas Guyot
2021-05-31  3:35                       ` Bagas Sanjaya
2021-05-30 22:23                   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210529092752.kifzqt3haddzgsob@tb-raspi4 \
    --to=tboegi@web.de \
    --cc=bagasdotme@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=yuri@rawbw.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).