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

Matt Brubeck mbrubeck at cs.hmc.edu
Tue Nov 16 19:44:08 UTC 2004


> 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.




More information about the darcs-users mailing list