I'm writing a utility that checks for specific keyword(s) found in the files in a given directory recursively. What's the best strategy to avoid opening a bin file or some sort of garbage dump? Check encoding of the given file?

If so, what are the most popular encodings (in POSIX if that matters) and how do I detect them?

Reply via email to