Prevent opening binary/other garbage files

helxi brucewayneshit at gmail.com
Sat Sep 29 15:52:30 UTC 2018


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?


More information about the Digitalmars-d-learn mailing list