New personal experimental book

DJ Lucas dj at
Sat Sep 13 02:43:46 PDT 2008

Alexander E. Patrakov wrote:
> DJ Lucas wrote:
>> Roll back to file-4.21.  The newer versions of file do not display the
>> character set if type is text/troff
> Testcase please. IMHO they are right, as it is impossible to reliably decide 
> between, say, ISO-8859-1 and KOI8-R based only on manpage contents (without 
> using a dictionary containing the translation of, say, "NAME" for all 
> languages). I.e., the old version was likely to give wrong answers anyway, 
> that's why this feature was removed. Could you please test both old and 
> new "file" on manual pages installed by Man-1.6f?
Shouldn't be necessary, but if you'd like to see the output, I can post 
it tomorrow.

The -e switch is still broken and since the older versions are not 
readily available... Have to look and see if I can find 22,23, or 24 
with working -e, and without the broken guessing.  The changelog does 
not mention releases.

As far as confirming the broken behavior, the output of the following 
commands should confirm that the guessing is broken in the old.  Now, 
IIRC, 4.25 still gave the bogus iso-8859-1 encoding for files detected 
as text/plain, but I'll try and confirm tomorrow (It's 4 AM here).

for level in 1 2 3 4 5 6 7 8
    for file in `find /usr/share/man -name "*.${level}*"`
        file -bi ${file} | \
            grep -v "ascii" | \
            grep -v "utf-8" | \
            grep -v "application" > /dev/null &&
        file -i ${file}
done > not-utf8.txt

Output will be at in a sec.

-- DJ Lucas

This message has been scanned for viruses and
dangerous content, and is believed to be clean.

More information about the lfs-dev mailing list