jnioche commented on code in PR #2251:
URL: https://github.com/apache/stormcrawler/pull/2251#discussion_r4341306531
##########
core/src/main/java/org/apache/stormcrawler/util/CharsetIdentification.java:
##########
@@ -92,11 +111,31 @@ public static String getCharsetFast(
/**
* Identifies the charset of a document based on the following logic:
guess from the
* ByteOrderMark - else if the same charset is specified in the http
headers and the html
- * metadata then use it - otherwise use ICU's charset detector to make an
educated guess and if
- * that fails too returns UTF-8.
+ * metadata then use it - otherwise use ICU's charset detector to make an
educated guess, with
+ * the html metadata or else the http headers as a hint, and if that fails
too returns UTF-8.
+ *
+ * @deprecated reads the HTTP Content-Type without a prefix, while fetched
metadata carries the
+ * one set by protocol.md.prefix: use {@link #getCharset(Metadata,
byte[], int, String)}
*/
+ @Deprecated
Review Comment:
same as above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]