[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: diff thinking files are binaries?



Bram Van Dam wrote:
> Greetings,
> 
> diff is acting strangelely. I have two directories filled with .cpp & .h 
> files, and when I run diff on them all I get is a list saying "Binary 
> files X and Y differ."
> 
> When I run file(1) on them it tells me the files are "Non-ISO 
> extended-ASCII C++ program text". This would have me believe that the 
  ^^^^^^^^
> files *are* (as they are!) plain text files.
>
> Apparently for some reason diff(1) thinks the files are binaries. Is 
> there any way to force diff(1) to parse the files as text files? Or is 
> there any way to, well, fix the files?

Sounds like you and I have different definitions of "plain text".
"extended-ASCII" doesn't sound very plain text to me. :)

Looking at the source for file.c (ascmagic.c looks very interesting), it
appears "extended-ASCII" means your file contains characters with codes
0x80-0x9f, which doesn't fall in my (early 1980s, hopelessly
mono-lingual) definition of a "plain text file".

Nick.
-- 
http://www.holland-consulting.net