also handle case where Charset.forName() throws IllegalCharsetNameException, as opposed to UnsupportedCharsetException