You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Tim Allison (JIRA)" <ji...@apache.org> on 2017/01/23 14:07:26 UTC
[jira] [Commented] (TIKA-2248) How to set up the content encoding
[ 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)