[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: text and binary files in SVN

From: Vincent Lefevre <vincent+svn_at_vinc17.org>
Date: 2007-08-14 16:36:06 CEST

On 2007-08-14 16:25:10 +0200, Erik Huelsmann wrote:
> There's an algorithm to estimate whether files are binary or texty:
>
> Check the first 1024 bytes to be within the 020-0x7F and 0x07-0x0D
> regions. If more than 85% of the bytes fall in that region (and none
> were 0x00), then the file is probably texty.

I wonder if non-occidental users would agree with you.
And what about UTF-16?

> So, if your files don't have that property, Subversion will consider
> them binary, until you set a mime-type which makes it look texty
> (starting with text/)

One can have compressed XML files with text/xml mime-type. How does
Subversion handle that? Also, for instance, is text/rtf more textual
than application/x-sh as far as diff is concerned?

-- 
Vincent Lefèvre <vincent_at_vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Aug 14 16:34:15 2007

This is an archived mail posted to the Subversion Users mailing list.