I have a project where the files are 8-bit encoded (Win-1251). Can you please tell me if there is a way using git grep to find a phrase composed of characters from the top of the ASCII table (i.e. with codes from 0x80 to 0xFF)?
I work under Windows. I use the console to work with git, and it seems that the text that I pass to search in git grep (for example, git grep "привет"
) is perceived by this utility as a sequence of utf-8 characters, i.e. git grep is actually trying to find the sequence of bytes "\xD0\xBF\xD1\x80\xD0\xB8\xD0\xB2\xD0\xB5\xD1\x82".
I also tried to execute this command for searching: git grep "\xEF\xF0\xE8\xE2\xE5\xF2"
(where byte sequence in quotes is ASCII codes of "привет"
word in Win-1251), but it turned out that grep does not accept escape sequences.