grep command in cygwin can't use chinese character

0

I find that the grep command in cygwin can't use chinese characters, how can i fix this?

I create a file named test.txt, which contains a chinese character "圣诞节" (meaning of christmas).

grep   "圣诞节"  /cygdrive/c/*

nothing happens, and the file will not be searched.

my problem is that chinese character can be displayed on my screen ,and chinese character can be inputted into cgywin console ,and i can search chinese character with grep,but can not get right result with grep "圣诞节" /cygdrive/c/*.

it_is_a_literature

Posted 2013-12-20T03:10:54.957

Reputation: 373

Answers

0

Please see this link from Cygwin on setting up your locale. From there, you may be able to use Unicode characters with Cygwin utilities, but I haven't tested it to be sure.

MattDMo

Posted 2013-12-20T03:10:54.957

Reputation: 4 968

0

the phenomenon vanish after my reinstallation of vim .

it_is_a_literature

Posted 2013-12-20T03:10:54.957

Reputation: 373