This script allows you to perform a quick test to see if a file or string contains text or is binary. The difference between text and binary is ill-defined, so this duplicng contains text or is binary. The difference between text and binary is ill-defined, so this duplicates the definition used by Perl’s -T flag, which is:
The first block or so of the file is examined for odd characters such as strange control codes or characters with the high bit set. If too many strange characters (>30%) 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.
Download from: Homepage
Author:
Time:
Saturday, June 21st, 2008 at 2:45 pm
Category:
Comments:
You can leave a response, or trackback from your own site.
RSS:
You can follow any responses to this entry through the RSS 2.0 feed.
Navigation: