Pages

Monday, June 25, 2018

check for non-ascii


  • pcregrep --color='auto' -n "[\x80-\xFF]"  <file>
  • LANG=C/LC_ALL=C grep -P '[\x80-\xFF]' <file>
  • LANG=C/LC_ALL=C sed -n '/[\x80-\xFF]/p' <file>
  • LANG=C/LC_ALL=C  sed 's/[\x80-\xFF]//g' <file>

Source: LC_ALL