[darcs-users] Binary File Behaviour

David Roundy droundy at abridgegame.org
Tue Oct 26 10:13:37 UTC 2004


On Mon, Oct 25, 2004 at 10:46:25AM +0100, Simon Liu wrote:
> Hi,
> 
> I have a few questions on binary file behaviour.
> 
> 1) Does Darcs do any checking of files to see if it is binary or not? 
> What happens if a file is binary but is not covered by the binaries
> regexp list?

As Mark said, we check for \0, and a few other characters that really don't
belong in text files.

> 2) Does Darcs do any translation/modification of files it considers as
> text or "not-binary"?  Translations might include things like
> end-of-line based on file vs system eol chars.  e.g PC file on Unix.

We don't mess with your end-of-lines, or change encoding.

> 3) What is the current behaviour with regards to text files in
> different language encodings?  UTF-8, UTF-16, etc.  Are these files
> treated as binary?  In my tests with 'darcs whatsnew' it seems that
> darcs is aware of language encodings (to what extent?) and treated my
> UTF-8 file as a text file, with non-ASCII characters escpaed.

As long as your text format has \n as new newline, darcs is fine.  The
escaping is just for display purposes to avoid inadvertently messing up
your terminal.
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list