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

Re: Ascii/binary detection.

From: Branko Èibej <brane_at_xbc.nu>
Date: 2001-08-03 20:44:48 CEST

kfogel@collab.net wrote:

>Branko =?ISO-8859-2?Q?=C8ibej?= <brane@xbc.nu> writes:
>
>>Right. Note that when we were discussing this (damn, don't have that
>>archive any more ...), someone pointed out that the "text/*" mime types
>>actually imply CRLF line endings. But I think we can safely ignore that;
>>Subversion is not an MUA.
>>
>
> "Every program attempts to expand until it can read mail.
> Those programs which cannot so expand are replaced by ones that
> can."
> -- [Third] Law of Software Envelopment
>
> [also apparently known as "Zawinski's Law", but jwz
> quotes it thus, so don't know if he's the originator]
>
Actually, subversion /will/ be able to read mail -- when we support
clien-side plugins, and someone writes a mail-reader plugin. :-)

>>>1. Develop a heuristic for determining the binariness of a file, say
>>> svn_io_is_binary_file ()
>>>
>>(Two suggestions: a) don't mark the file as binary just because there's
>>a byte with value >= 128 in it; b) if other tests aren't conclusive,
>>check for extremely long lines in the file?)
>>
>
>That combination is exactly what we were planning to do, yeah -- some
>combination of a) at least a certain percentage of bytes with the high
>bit set, and b) long lines.
>
I wonder what we'll do with a Chinese text in UTF-8? More then 65% of
the bytes will be >128.

BTW, would it make sense to have a sort of wrappers configuration, like
CVS does?

>>This looks good, even if you ignore all my comments.
>>
>
>Even this one?
>
Ha, that's an opinion, not a comment. You can't ignore my opinions. :-)

-- 
Brane �ibej
    home:    <brane_at_xbc.nu>             http://www.xbc.nu/brane/
    work:    <branko.cibej_at_hermes.si>   http://www.hermes-softlab.com/
      ACM:   <brane_at_acm.org>            http://www.acm.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:35 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.