threads / discuss / 56153

Git show only showing ASCII chars problem

Subject: Git show only showing ASCII chars problem

## tl;dr

3 messages between Jul 23, 2021 and Jul 23, 2021.

replies: 2people: 3as markdown or json

Daniel Santos· Jul 23, 2021, 17:20 UTC · lore

Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue) git show

What did you expect to happen? (Expected behaviour) Show non-ASCII characters

What happened instead? (Actual behaviour) `show` does not show non-ASCII characters such as ç , ã , õ ...

What's different between what you expected and what actually happened? I expect for `git show` to show all of my machine locale characters, such as ç , without any problem

Anything else you want to add: I am on Arch Linux and I installed git using pacman. That is all.

Please review the rest of the bug report below. You can delete any lines you don't wish to share.

[System Info] git version: git version 2.32.0 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh uname: Linux 5.10.52-1-lts #1 SMP Tue, 20 Jul 2021 16:46:09 +0000 x86_64 compiler info: gnuc: 11.1 libc info: glibc: 2.33 $SHELL (typically, interactive shell): /bin/bash

[Enabled Hooks] not run from a git repository - no hooks to show

Felipe Contreras· Jul 23, 2021, 18:06 UTC · re: Daniel Santos · lore

RE: Git show only showing ASCII chars problem

Daniel Santos wrote:
Show 15 quoted lines
> Thank you for filling out a Git bug report!
> Please answer the following questions to help us understand your issue.
> 
> What did you do before the bug happened? (Steps to reproduce your issue)
> git show
> 
> What did you expect to happen? (Expected behaviour)
> Show non-ASCII characters
> 
> What happened instead? (Actual behaviour)
> `show` does not show non-ASCII characters such as ç , ã , õ ...
> 
> What's different between what you expected and what actually happened?
> I expect for `git show` to show all of my machine locale characters, 
> such as ç , without any problem
What is the content of your LANG environment variable?

Also, can you attach the commit that caused the issue? You can save it with this command:

  git cat-file -p @ > commit.txt
-- 
Felipe Contreras
Junio C Hamano· Jul 23, 2021, 19:37 UTC · re: Daniel Santos · lore

Re: Git show only showing ASCII chars problem

Daniel Santos <hello@brighterdan.com> writes:
Show 5 quoted lines
> Thank you for filling out a Git bug report!
> Please answer the following questions to help us understand your issue.
>
> What did you do before the bug happened? (Steps to reproduce your issue)
> git show

Thanks for a report, but sorry, it is *not* "steps to reproduce your issue", as people who do not have the commit you have trouble with checked out would not see your issue reproduced by typing "git show". Something like this:

    $ mkdir newdir; cd newdir; git init
    $ echo 'ç ã õ' >file; git add file
    $ git commit -m "add file with non-ascii contents"
    $ git show

may be detailed enough for people to try reproducing what I see (i.e. creation of a single-line file is shown with its non-ascii contents).

By the way, if the problem is that your pathnames in the patch are protected from corruption by quoting, perhaps

    $ git config --global core.quotepath false

may be what you are looking for. I couldn't tell from your report if that is the case, though.

Thanks.

← back to recent threads