[HER-741] Make extractors interrogate for charset

* ExtractorHTML
    fix reflexive probe to look as many characters in (1000) as initially
This commit is contained in:
gojomo
2011-07-14 06:53:56 +00:00
parent be12d1e8f3
commit 2e10d07da2
@@ -672,7 +672,7 @@ public class ExtractorHTML extends ContentExtractor implements InitializingBean
String contentPrefix = curi.getRecorder().getContentReplayPrefixString(1000);
Charset contentDeclaredEncoding = getContentDeclaredCharset(curi,contentPrefix);
if(!curi.getRecorder().getCharset().equals(contentDeclaredEncoding) && contentDeclaredEncoding!=null) {
String newContentPrefix = curi.getRecorder().getContentReplayPrefixString(50,contentDeclaredEncoding);
String newContentPrefix = curi.getRecorder().getContentReplayPrefixString(1000,contentDeclaredEncoding);
Charset reflexiveCharset = getContentDeclaredCharset(curi, newContentPrefix);
if(contentDeclaredEncoding.equals(reflexiveCharset)) {
// content-declared charset is self-consistent; use