9

My full name is a bit long and contains a non-ascii character ã. I was wondering if I should use it in git config --global user.name or just keep it short (and what implications this decision would bring along).

In other words, are there any problems with using my full name (in terms of its length), along with the non-ascii character in it?

git config --global user.name "Hugo Leonardo Leão Mota"
Hugo Mota
  • 11,200
  • 9
  • 42
  • 60
  • I think Git might have good support for unicode characters by default, but I'm not sure. In terms of the length of the name, I doubt it would be a problem, because it's not *that* long, in my opinion. –  Jul 19 '14 at 22:59

3 Answers3

7

As mentioned in this thread, utf8 characters will work fine with a recent enough Git (since git 1.7.10).

After that, it is up to the tol you are using to be able to display that string correctly.
For instance, Qt Creator had to include a patch to display the author in UTF-8 encoding.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
2

Git, and tools that use Git, should support full-length names with Unicode characters. Although you may run into bugs with some tools, that's no reason to compromise how you sign your work.

A good way to see what's generally acceptable is to look at an existing project. In Git itself, for example:

git log --pretty=format:%an | sort -u | less

Specifically, checking for developers with a name longer than yours:

git log --pretty=format:%an | sort -u | egrep '.{25}'

shows seventeen longer names.

Joe
  • 29,416
  • 12
  • 68
  • 88
1

I think it depends on your system. Sometimes this can be an issue, but it won't break anything - just display a funky symbol instead of the ã.

hannahen
  • 11
  • 1