tags:

views:

43

answers:

1

I've just tried to hg diff some C source files and was told that they are binary.

So, my question is: How can I convince UNIX and Mercurial that these files are, in fact, ASCII?

Thanks in advance for your help.

+2  A: 

hg thinks the files are binary because they have embedded nulls (ASCII 0).

EDIT: You can start with simple script:

for i in *.c
do
temp=$(mktemp);
tr -d '\000' < "$i" > $temp
mv -f $temp "$i"
done
Matthew Flaschen
Thanks Matthew.Any thoughts on how to find/remove these pesky nulls?
rossmcf