kamranahmedse / git-standup

Recall what you did on the last working day. Psst! or be nosy and find what someone else in your team did ;-)
MIT License
7.62k stars 304 forks source link

Possible issue with accents #43

Closed aarongarciah closed 7 years ago

aarongarciah commented 8 years ago

Hi Kamra!

I've been using git-standup in the last couple weeks and is awesome. I think there's an issue with the author's name when it contains accents.

When I execute git-standup -a "Aarón García Hervás" (my user.name in my gitconfig) the output is Seems like Aarón García Hervás did nothing!, that's not correct.

When When I execute git-standup -a "myemail@gmail.com" (my user.email in my gitconfig) the output is correct.

Thanks!

javierugarte commented 8 years ago

Hi,

I have the same problem.

Thanks!

m4grio commented 7 years ago

Could be related to your env rather than the plugin itself, I think. You guys need to check whether your locale env is set in a way you can use UTF-8, because the plugin is only passing what you set in -a to the git log --author option as-is.

Consider this:

$ echo $LC_CTYPE
UTF-8

My surname has also an acute accent (often called accents only).

$ cat ~/.gitconfig | grep name
    name = Mario Álvarez

Then:

$ touch test
$ git add test
$ git commit -m "Test"
[master 3456a17] Test
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 test
$ git standup -a "Mario Álvarez"
3456a17 - Test (12 seconds ago) <Mario Álvarez>

I am able to get the plugin to filter using the char Á in my surname on 2.1.8.

aarongarciah commented 7 years ago

I edited my global .gitconfig and noticed after deleting the accents in my user name that the characters where actually not in UTF-8 because they needed two backspaces to be deleted. Sorry for opening the issue, my bad.

Now it works! Thanks!

PD: @javierugarte check if you have the same problem with the special characters.