You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Marco Quaranta (JIRA)" <ji...@apache.org> on 2014/10/02 17:18:33 UTC

[jira] [Created] (TIKA-1434) Plain text file reported as binary

Marco Quaranta created TIKA-1434:
------------------------------------

             Summary: Plain text file reported as binary
                 Key: TIKA-1434
                 URL: https://issues.apache.org/jira/browse/TIKA-1434
             Project: Tika
          Issue Type: Bug
          Components: detector, mime
    Affects Versions: 1.6
            Reporter: Marco Quaranta
            Priority: Minor


Mime type detection of the attached file, an ASCII file, reports application/octect-stream. The negative result is caused by ASCII-extended characters in the file; TextStatistics.isMostlyAscii() calls return false. We could try to call TextDetector.detect() two times: if the first call fails, then we can try to convert bytes in utf-8 and call it again. What do you think?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)