Search for non-ASCII characters in code files

Many bad programmers are installing non-ASCII input method in their computers, and then put some highly secret bugs in code. What's worse, powershell doesn't report these error, and simply causing unpredictable behaviors.

Use this command to detect every bad character and fuck them up!

grep -P '[^\x00-\x7f]' --text --color=always $(find . -type f '(' -iname '*.ps1' -o -iname '*.cs' -o -iname '*.csproj' -o -iname '*.cmd' ')' )

If you want to ignore these idiot BOM headers, use the following command instead:

I strongly discourage anyone to use BOM headers in any file.

LANG=C grep -P '[^\x00-\x7f]' --text $(find . -type f '(' -iname '*.ps1' -o -iname '*.cs' -o -iname '*.csproj' -o -iname '*.cmd' ')' ) | LANG=C grep -v -P '\xef\xbb\xbf|\xff\xfe' | grep -P '[^\x00-\x7f]' --color=always