git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Guyot <tguyot@gmail.com>
To: Yuri <yuri@rawbw.com>, "Jeff King" <peff@peff.net>,
	"Torsten Bögershausen" <tboegi@web.de>
Cc: Bagas Sanjaya <bagasdotme@gmail.com>,
	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: Sun, 30 May 2021 21:14:35 -0400	[thread overview]
Message-ID: <c1afaf46-0425-110b-6303-f68d3f994b7f@gmail.com> (raw)
In-Reply-To: <481fbc88-3e7d-6b00-0997-1a80b87a637d@rawbw.com>

On 2021-05-30 17:55, Yuri wrote:
> On 5/30/21 2:44 PM, Jeff King wrote:
>> Yeah, I'm not sure how such a check would be done. On most Linux systems
>> I've seen, $LANG will mention "en_US.UTF-8" or similar. But I've no idea
>> how portable that convention is, not to mention that people may have
>> more complex setups anyway (e.g., not setting $LANG but setting some of
>> LC_*).
> 
> 
> When 'locale charmap' prints 'UTF-8' the terminal can be assumed to be
> able to accept UTF-8 characters.
> 
> 'locale charmap', I think, determines this only based on environment
> variables.
> 

Hi Yuri,

Even if the terminal supports UTF8, will it print it properly? The font
used could have no or minimal utf8 support. Even when it's supported,
some characters might look alike and this could have undesired
consequences (ex accidentally switching from a normal space to a
non-break space while renaming a file that has spaces...).

I believe repos with utf8 files are rare enough and it could be left to
the user to select whenever to use utf8 or not... An option like "auto"
or "detect" could make it automatic but I'm not convinced it should be
the default.


Oh, and looking at "locale charmap", it doesn't check the terminal
capabilities at all - it just prints the charmap based on LC_ALL or
LC_CTYPE value, or default if they're unset. It doesn't mater what
terminal you're on...

Regards,

--
Thomas

  reply	other threads:[~2021-05-31  1:14 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
2021-05-30 21:44                 ` Jeff King
2021-05-30 21:55                   ` Yuri
2021-05-31  1:14                     ` Thomas Guyot [this message]
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

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

  git send-email \
    --in-reply-to=c1afaf46-0425-110b-6303-f68d3f994b7f@gmail.com \
    --to=tguyot@gmail.com \
    --cc=bagasdotme@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=tboegi@web.de \
    --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.
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 NNTP newsgroup(s).