isutf8 - Man Page
check whether files are valid UTF-8
Examples (TL;DR)
- Check whether the specified files contain valid UTF-8:
isutf8 path/to/file1 path/to/file2 ...
- Print errors using multiple lines:
isutf8 --verbose path/to/file1 path/to/file2 ...
- Do not print anything to
stdout
, indicate the result merely with the exit code:isutf8 --quiet path/to/file1 path/to/file2 ...
- Only print the names of the files containing invalid UTF-8:
isutf8 --list path/to/file1 path/to/file2 ...
- Same as
--list
but inverted, i.e., only print the names of the files containing valid UTF-8:isutf8 --invert path/to/file1 path/to/file2 ...
Synopsis
isutf8 [-hqliv] [--help] [--quiet] [--list] [--invert] [--verbose] [[file]]
Description
isutf8 checks whether files are syntactically valid UTF-8. Input is either files named on the command line, or the standard input. Notices about files with invalid UTF-8 are printed to standard output.
Options
- -h, --help
Print out a help summary.
- -q, --quiet
Don't print messages telling which files are invalid UTF-8, merely indicate it with the exit status.
- -l, --list
Print only the names of files containing invalid UTF-8.
- -i, --invert
Invert the selection: list UTF-8 compatible files.
- -v, --verbose
Also print an hexdump-like view of the error and some context.
Exit Status
If the file is valid UTF-8, the exit status is zero. If the file is not valid UTF-8, or there is some error, the exit status is non-zero.
Author
Lars Wirzenius, Julien Palard