For some cases missing EOL is expected, but diff -b will ignore EOL difference, use cmp instead.
This is useful for avoiding crashing on "cdiff -l" (on Python 3) in https://github.com/myint/cppclean. Also handle unknown encodings gracefully rather than crashing.