I have a large text file that contains a few unicode characters that make LaTeX crash. How can I find non-ASCII characters in a file with sed, and the like in a Linux bash?
相关问题
- JQ: Select when attribute value exists in a bash a
- UrlEncodeUnicode and browser navigation errors
- bash print whole line after splitting line with if
- “command not found” errors in expect script execut
- grep using grep results
相关文章
- Check if directory exists on remote machine with s
- What's the difference between grep -r and -R
- Why is `'↊'.isnumeric()` false?
- Reverse four length of letters with sed in unix
- How to display unicode in SVG?
- Launch interactive SSH bash session from PHP
- BASH: Basic if then and variable assignment
- Bash script that creates a directory structure
Try this command:
Try:
Which can be used like:
Within
[]
^
means "not". So[^ -~]
means characters not between space and ~. So excluding control chars, this matches non ASCII characters, and is a more portable though slightly less accurate version of[^\x00-\x7f]
below. The\+
means1 or more
and will get multibye characters to have a color shown around the complete character(s), rather than interspersed in each byte, thus corrupting the multibyte sequence