Is there a simple way to print all non-ASCII characters and the line numbers on which they occur in a file using a command line utility such as grep
, awk
, perl
, etc?
I want to change the encoding of a text file from UTF-8 to ASCII, but before doing so, wish to manually replace all instances of non-ASCII characters to avoid unexpected character changes effected by the file conversion routine.