Git grep does not support multi-byte characters (like UTF-8)
- From
- Plamen Totev <plamen.totev@abv.bg>
- Date
- Jul 6, 2015, 11:28 UTC
- Message-ID
- <2008630603.1189842.1436182096558.JavaMail.apache@nm33.abv.bg>
Hello,
It looks like the git grep command does not support multi-byte character sets like UTF-8. As a result some of the grep functionality is not working. For example if you search for non Latin words the ignore case flag does not have effect(the search is case sensitive). I suspect there are some regular expressions that will not work as expected too.
When I'm using the git from the shell I could use the GNU grep utility instead. But some tools like gitweb use git grep so they are not working properly with UTF-8 files with non Latin characters.
Much of the grep code seems to be copied from the GNU grep utility but the multi-byte support is left out. I just wondered what could be the reason.
Regards, Plamen Totev