[ 
https://issues.apache.org/jira/browse/TIKA-1175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nick Burch resolved TIKA-1175.
------------------------------

       Resolution: Fixed
    Fix Version/s: 1.6

Thanks for this, magic added in r1593311.

> MS Money files wrongly detected as True Type Font
> -------------------------------------------------
>
>                 Key: TIKA-1175
>                 URL: https://issues.apache.org/jira/browse/TIKA-1175
>             Project: Tika
>          Issue Type: Bug
>          Components: mime
>    Affects Versions: 1.3, 1.4
>            Reporter: Boris Naguet
>            Priority: Minor
>             Fix For: 1.6
>
>
> TTF magic is probably not specific enough, because it incorrectly detect MS 
> Money files as TTF files, and then the parsing generates an Exception.
> {quote}
> Caused by: ! java.io.IOException: head is mandatory
> ! at 
> org.apache.fontbox.ttf.AbstractTTFParser.parseTables(AbstractTTFParser.java:107)
>  
> {quote}
> Here is the magic detection code that I added to {{custom-mimetypes.xml}}, 
> and solves it:
> {code:xml}
> <mime-info>
>       <mime-type type="application/x-msmoney">
>               <glob pattern="*.mny" />
>               <magic priority="60">
>                       <match value="0x000100004D534953414D204461746162617365" 
> type="string" offset="0" />
>               </magic>
>       </mime-type>
> {code}
> It can replace the existing {{application/x-msmoney}} empty mime-type in 
> {{tika-mimetypes.xml}}.
> magic comes from
> http://filesignatures.net/index.php?search=mny&mode=EXT



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to