Skip to content

Instantly share code, notes, and snippets.

@esausilva
Last active August 1, 2022 22:18
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esausilva/177b262cbfb7a81ec19b6d221c7365f8 to your computer and use it in GitHub Desktop.
Save esausilva/177b262cbfb7a81ec19b6d221c7365f8 to your computer and use it in GitHub Desktop.
Find non-ASCII characters

One-liner for finding non-ASCII characters

# Linux
$ grep --color='auto' -P -n "[\x80-\xFF]" file.js

# Mac OS X after 'brew install pcre'
$ pcregrep --color='auto' -n "[\x80-\xFF]" file.js
@johntreankler
Copy link

Thanks, this worked great for me on a mac. 😸

@esausilva
Copy link
Author

@johntreankler Awesome. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment