Diff-command: doesn't print lines that are different but still says the two files are different

diff, unix

Solution

Make sure to ignore white space in the diff options.

It may also see Unicode characters and interpret that as binary. See if your diff tool has an option to force text mode.

Problem

I'm using the diff command to compare two text files. They need to be literally matched. So I use the diff: `diff binary.out binary.expected` (By the way, those files are NOT binary files. They are text file. I call them binary because that's the name of the project) and got `Binary files binary.out and binary.expected differ` When I use another diff tool, the smartest of all (AKA human), and there's really nothing different between the two files. Does anyone happen to know what's going on here? Thanks.

Original source