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

Re: another data point: perl

From: <cmpilato_at_collab.net>
Date: 2001-08-10 23:21:32 CEST

Ben Collins-Sussman <sussman@collab.net> writes:

> How Perl detects binary/text files:
>
> "The -T and -B switches work as follows. The first block or so of the
> file is examined for odd characters such as strange control codes or
> metacharacters. If too many odd characters (>10%) are found, it's a -B
> file, otherwise it's a -T file. Also, any file containing null in the
> first block is considered a binary file."
>
> - from http://www.cs.cmu.edu/Web/People/rgs/pl-exp-op.html
> (found by Greg Stein)

Sweet. I was just writing the default binary detector, and the
algorithm I chose was essentially the same (I was going to get them
15% instead of 10).

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