[
https://issues.apache.org/jira/browse/TIKA-2673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16519100#comment-16519100
]
Gerard Bouchar commented on TIKA-2673:
--------------------------------------
Another important part of the specification that is ignored by
HtmlEncodingDetector is [paragraph 4.2 of the encoding
spec|https://encoding.spec.whatwg.org/#names-and-labels], that specifies
aliases to use for encodings. HtmlEncodingDetector simply uses
[Charset.forName|https://docs.oracle.com/javase/8/docs/api/java/nio/charset/Charset.html#forName-java.lang.String-].
The specification maps some labels to DIFFERENT charsets. For instance
"ISO-8859-1" is mapped to the WINDOWS-1252 encoding.
> HtmlEncodingDetector doesn't follow the specification
> -----------------------------------------------------
>
> Key: TIKA-2673
> URL: https://issues.apache.org/jira/browse/TIKA-2673
> Project: Tika
> Issue Type: Bug
> Reporter: Gerard Bouchar
> Priority: Major
> Attachments: HtmlEncodingDetectorTest.java
>
>
> This bug is linked to TIKA-2671, but does not concern metadata, but rather
> the bytes-based detection itself.
> While reading the specification, I collected a list of sample cases where
> HtmlEncodingDetector differs from the specification, and thus fails at
> detecting the right charset.
> I am attaching the test cases to this issue:
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)