//}
// The following appears to be necessary to ensure that encoding errors are not recovered.
Charset charset = Charset.forName(encoding);
CharsetDecoder decoder = charset.newDecoder();
decoder = decoder.onMalformedInput(CodingErrorAction.REPORT);
decoder = decoder.onUnmappableCharacter(CodingErrorAction.REPORT);
return new BufferedReader(new InputStreamReader(is, decoder));
} catch (IOException err) {