mattn / jvgrep

grep for japanese vimmer
https://mattn.kaoriya.net/
140 stars 19 forks source link

UTF-8 text files that contain non-ASCII characters are not matched #72

Closed kechako closed 4 years ago

kechako commented 4 years ago

UTF-8 text files that contain non-ASCII characters are not matched when the pattern is ASCII only. If --enc=utf-8 option is specified, it matches.

This issue occurs in v5.8.0 or later. It doesn't occur in v5.7.0.

The following is sample.

sample.txt

非 ASCII 文字と
ASCII が
混ざっている
テキスト

And if run the following command, it doesn't match.

$ jvgrep ASCII sample.txt
mattn commented 4 years ago

Thank you!