You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2023/11/23 05:06:00 UTC

[jira] [Comment Edited] (TIKA-4172) Apple binary file incorrectly identified as text/x-sql due to filename

    [ https://issues.apache.org/jira/browse/TIKA-4172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17788982#comment-17788982 ] 

Tilman Hausherr edited comment on TIKA-4172 at 11/23/23 5:05 AM:
-----------------------------------------------------------------

Which tika call are you using? Have you tried detecting based on content only?


was (Author: tilman):
Which tika call are you using? Have you tried detecting purely on content?

> Apple binary file incorrectly identified as text/x-sql due to filename
> ----------------------------------------------------------------------
>
>                 Key: TIKA-4172
>                 URL: https://issues.apache.org/jira/browse/TIKA-4172
>             Project: Tika
>          Issue Type: Bug
>          Components: general
>    Affects Versions: 2.9.1
>            Reporter: martin k.
>            Priority: Minor
>
> This is related to [https://github.com/eikek/docspell/issues/2376] and [https://github.com/eikek/docspell/issues/2403.]
> Take the following Base64 encoding of a binary Apple-generated file. No idea what it does. You can get the file by piping the following to e.g. {{base64 -d > something.sql}}
> {code:java}
> ABRkMDEwMWM2Nl9teVNRTDQwLnNxbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbUJJTgAA
> AAAAAAAAAAAAAAAAAACCgf+/AAA=
> {code}
> If this file is name {{{}something.sql{}}}, then Tika will classify it as {{{}text/x-sql{}}}, which it is not. It seems like more weight is given to the filename (extension) than the fact that the file is binary anyway.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)