if (charset != null) {
try {
domBuilder.setFeature(HTMLScanner.IGNORE_SPECIFIED_CHARSET, true);
}
catch (final Exception e) {
throw new ObjectInstantiationException("Error setting HTML parser feature", e);
}
}
else {
final String specifiedCharset = webResponse.getRequestSettings().getCharset();
if (specifiedCharset != null) {