[comp.sys.mips] diff 8-bit behaviour

lamy@sobeco.com (Jean-Francois Lamy) (08/30/90)

"diff" thinks that any file that contains my name properly spelled is
a binary file (as it does for any file that has any character with
the 8th bit turned on).  This sort of cramps my style when I need to
diff two French documents...

Jean-Francois Lamy               lamy@sobeco.com, uunet!sobeco!lamy
Groupe Sobeco, 505 ouest, bd Rene-Levesque, Montreal Canada H2Z 1Y7

rogerk@mips.COM (Roger B.A. Klorese) (08/31/90)

In article <1990Aug29.234042.6557@sobeco.com> lamy@sobeco.com (Jean-Francois Lamy) writes:
>"diff" thinks that any file that contains my name properly spelled is
>a binary file (as it does for any file that has any character with
>the 8th bit turned on).  This sort of cramps my style when I need to
>diff two French documents...

The BSD versions of commands (in the /bsd43/bin tree) are *not* 8-bit-clean;
the System V versions are.  On extended-character-set files, use /bin/diff,
not /bsd43/bin/diff.
-- 
ROGER B.A. KLORESE                                  MIPS Computer Systems, Inc.
MS 6-05    930 DeGuigne Dr.   Sunnyvale, CA  94086              +1 408 524-7421
rogerk@mips.COM         {ames,decwrl,pyramid}!mips!rogerk         "I'm the NLA"
"Life is far too important a thing ever to talk seriously about." - Oscar Wilde

lamy@sobeco.com (j.lamy) (09/07/90)

In <41203@mips.mips.COM> rogerk@mips.COM (Roger B.A. Klorese) writes:

>			[...] On extended-character-set files, use /bin/diff,
>not /bsd43/bin/diff.

Not quite.  /bin/diff lacks context diffs, which I'd deem essential (esp. for
generating patches, rcsdiff et al. in a Latin1-ish environment).  

I appreciate very much the effort towards 8-bit cleanliness on the sys V side,
and the fact that the 4.50 BSD environment has shown itself to be quite
complete so far.  I just hope worthwhile pieces of the BSD stuff get cleaned
up too and not simply written off as hopeless junk, or that (SVR4 helping)
the functionality migrates into the mainstream versions.

eggert@twinsun.com (Paul Eggert) (09/07/90)

lamy@sobeco.com (j.lamy) writes:

>In <41203@mips.mips.COM> rogerk@mips.COM (Roger B.A. Klorese) writes:

>>			[...] On extended-character-set files, use /bin/diff,
>>not /bsd43/bin/diff.

>Not quite.  /bin/diff lacks context diffs, which I'd deem essential (esp. for
>generating patches, rcsdiff et al. in a Latin1-ish environment).  

GNU DIFF 1.14 has context diffs, and compares 8-bit files if you use its -a
option.  Also, it's faster than the BSD and SYSV diffs.

rogerk@mips.COM (Roger B.A. Klorese) (09/07/90)

In article <1990Sep6.220013.25777@sobeco.com> lamy@sobeco.com (j.lamy) writes:
>I appreciate very much the effort towards 8-bit cleanliness on the sys V side,
>and the fact that the 4.50 BSD environment has shown itself to be quite
>complete so far.  I just hope worthwhile pieces of the BSD stuff get cleaned
>up too and not simply written off as hopeless junk, or that (SVR4 helping)
>the functionality migrates into the mainstream versions.

I will certainly log this as a general enhancement request.

The reason that the 8-bit cleanup was performed on the SysV side and not on
the BSD side was not a malevolent decision, but a short-term no-brainer: we
upped the porting base on the SysV side to SVR3.2 from SVR3.0, and 3.2 is
8-bit clean.
-- 
ROGER B.A. KLORESE                                  MIPS Computer Systems, Inc.
MS 6-05    930 DeGuigne Dr.   Sunnyvale, CA  94086              +1 408 524-7421
rogerk@mips.COM         {ames,decwrl,pyramid}!mips!rogerk         "I'm the NLA"
"Life is far too important a thing ever to talk seriously about." - Oscar Wilde

bruce@cs.su.oz (Bruce Janson) (09/07/90)

In article <1990Sep6.220013.25777@sobeco.com> lamy@sobeco.com (j.lamy) writes:
>In <41203@mips.mips.COM> rogerk@mips.COM (Roger B.A. Klorese) writes:
>
>>			[...] On extended-character-set files, use /bin/diff,
>>not /bsd43/bin/diff.
>
>Not quite.  /bin/diff lacks context diffs, which I'd deem essential (esp. for
>generating patches, rcsdiff et al. in a Latin1-ish environment).  
>
>I appreciate very much the effort towards 8-bit cleanliness on the sys V side,
>and the fact that the 4.50 BSD environment has shown itself to be quite
>complete so far.  I just hope worthwhile pieces of the BSD stuff get cleaned
>up too and not simply written off as hopeless junk, or that (SVR4 helping)
>the functionality migrates into the mainstream versions.

I suppose it depends on whether MIPSCo intend their bsd43 stuff to be a
faithful reproduction of 4.3BSD or, instead, to be what you (and I as well
in this instance) consider an improvement over 4.3BSD.
Remember, there may be quite complicated shell scripts Out There
that rely on the fact that 4.3BSD diff blows up in a particular way on
files which contain bytes which have their high bits set, although I
doubt there would be many.
My vote goes with the "faithful emulation" school of thought: if they
want to fix bugs in 4.3BSD then I ask that they put the improved
environment under /bsd43_with_mips_enhancements rather than /bsd43.

Cheers,
bruce.

Bruce Janson
Basser Department of Computer Science
University of Sydney
Sydney, N.S.W., 2006
AUSTRALIA

Internet:	bruce@basser.cs.su.oz.au
Telephone:	+61-2-692-3264
Fax:		+61-2-692-3838

rogerk@mips.COM (Roger B.A. Klorese) (09/08/90)

In article <1186@cluster.cs.su.oz> bruce@cs.su.oz (Bruce Janson) writes:
>My vote goes with the "faithful emulation" school of thought: if they
>want to fix bugs in 4.3BSD then I ask that they put the improved
>environment under /bsd43_with_mips_enhancements rather than /bsd43.

Taking off my Mips Employee hat for a second and donning my RISC/os User
chapeau, I would expect that the baseline would be feature compatibility, and
any new functionality would be supplied with Mips-specific options.
-- 
ROGER B.A. KLORESE                                  MIPS Computer Systems, Inc.
MS 6-05    930 DeGuigne Dr.   Sunnyvale, CA  94086              +1 408 524-7421
rogerk@mips.COM         {ames,decwrl,pyramid}!mips!rogerk         "I'm the NLA"
"Life is far too important a thing ever to talk seriously about." - Oscar Wilde