Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why does git show unicode as binary?

Why does git status and related tools treat unicode in filenames as binary?

[991]anarcat@marcos:test$ git init foo
Dépôt Git vide initialisé dans /home/anarcat/test/foo/.git/
[992]anarcat@marcos:test$ cd foo
[993]anarcat@marcos:foo$ touch hé
[994]anarcat@marcos:foo$ git add hé
[996]anarcat@marcos:foo$ git status --porcelain
A  "h\303\251"

I expected this to be:

A hé

git deals with accents and unicode fine in the content of files, why are filenames special?

like image 879
anarcat Avatar asked Mar 14 '26 07:03

anarcat


1 Answers

By default git prints non-ascii file names in quoted octal notation. You can disable this

git config --global core.quotepath off
like image 107
René Link Avatar answered Mar 17 '26 01:03

René Link



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!