[darcs-users] Re: petition for '\0' to be removed from binaryauto-detection code

Mark Stosberg mark at summersault.com
Tue Nov 16 22:09:30 UTC 2004


On 2004-11-16, Matt Brubeck <mbrubeck at cs.hmc.edu> wrote:
>> While I like the idea of auto-detecting binary files, I realized that
>> '\0' (aka NUL) is not a good test.
>>
>> It it sometimes used (at least) in Perl to put a bunch of things into
>> a string that you may want to separate back out later. The character
>> is used precisely because it doesn't occur in text.
>
> Wouldn't those Perl source files just contain the string "\0", not the
> actual character NUL?
>
> CGI.pm, for example, contains the string "\0" but does not contain any
> actual NUL characters.

I suppose you are right. I was confusing the control characters
themselves with the representation of them in source code. 
It's a point I've been confused about before. :)

    Marj





More information about the darcs-users mailing list