terça-feira, 27 de setembro de 2016

git não exibindo acentos

exemplo:
git status
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   .gitignore
#       modified:   editfile.js
#       modified:   "\321\203\321\201\321\202\320\260\320\275\320\276\320\262"


solução:
git has always used octal utf8 display, and one way to show the actual name is by using printf in a bash shell.

According to this comment, this works even in a Windows msysgit bash, which does include printf (and can be used as in "How do I use octal characters in a git checkout?").

But that doesn't change the output of commands like git status or git ls-files. However, since Git 1.7.10 introduced the support of unicode, this wiki page mentions:

By default, git will print non-ASCII file names in quoted octal notation, i.e. "\nnn\nnn...". This can be disabled with:

 git config [--global] core.quotepath off

Keep in mind that:

The default console font does not support Unicode. Change the console font to a TrueType font such as Lucida Console or Consolas. The setup program can do this automatically, but only for the installing user. 

 fonte: http://stackoverflow.com/questions/22827239/how-to-make-git-properly-display-utf-8-encoded-pathnames-in-the-console-window




fonte: 
http://stackoverflow.com/questions/22827239/how-to-make-git-properly-display-utf-8-encoded-pathnames-in-the-console-window

Nenhum comentário:

Postar um comentário