valid-utf8 — Filter tool to check whether text is valid UTF-8 or not
If no file argument is given, valid-utf8 reads from standard input.
Build
make
after building and installing dependencies:
Install
sudo make install
or, on OpenBSD:
doas gmake install
Run
Test a file:
valid-utf8 <file>
No output, but exit status will be 0 on success, but 1 if file is not valid UTF8.
Use a a filter:
echo "some text" | valid-utf8
Again, only exit status will indicate validity.
Find all valid UTF8 files in the current directory, and all directories under it:
find . -exec valid-utf8 "{}" \;
Description
UNIX filter which returns success if text data is valid utf-8, or failure otherwise. Handy for shell scripts or as
Readme
44 KiB
-exec
primary for find
.
Languages
Makefile
59.9%
C++
40.1%