Add README.md

This commit is contained in:
Bob Polis 2024-12-10 17:13:52 +01:00
parent c6a517ff1e
commit 259117bad5

40
README.md Normal file
View File

@ -0,0 +1,40 @@
# 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:
- [libscstring](https://git.bobpolis.com/bob/libscstring/)
## 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 "{}" \;`