tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Allison (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TIKA-2248) How to set up the content encoding
Date Mon, 23 Jan 2017 14:07:26 GMT

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

Tim Allison commented on TIKA-2248:
-----------------------------------

I don't think this is currently configurable via the tika-config file.

The current mechanism is driven by the service loading file in tika-parsers/src/main/resources/META-INF/services/o.a.t.detect.EncodingDetector.
 That specifies which detectors to run in what order.  The first detector to return a non-null
value is what Tika uses.

So, one option for now is to write your own EncodingDetector that returns whatever encoding
you want, perhaps driven by a value submitted via metadata, and register that in the services
file.

> How to set up the content encoding
> ----------------------------------
>
>                 Key: TIKA-2248
>                 URL: https://issues.apache.org/jira/browse/TIKA-2248
>             Project: Tika
>          Issue Type: Wish
>            Reporter: Aldo
>            Priority: Trivial
>
> If I try to set up content encoding with
> Metadata metadata = new Metadata();
> metadata.add(Metadata.CONTENT_ENCODING, DATAFILE_CHARSET);
> String parsedString = tika.parseToString(inputStream, metadata);
> metadata CONTENT_ENCODING is ignored;
> How I can force Tika to use CONTENT_ENCODING setted in metadata?
> Thank you.



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

Mime
View raw message