private boolean tryToSet7BitEncoding(MAPIMessage msg, String charsetName) {
        if (charsetName == null) {
            return false;
        }

        if (charsetName.equalsIgnoreCase("utf-8")) {
            return false;
        }
        try {
            if (Charset.isSupported(charsetName)) {
                msg.set7BitEncoding(charsetName);
                return true;
            }
        } catch (IllegalCharsetNameException | UnsupportedCharsetException e) {
            //swallow
        }
        return false;
    }
Tries to identify the correct encoding for 7-bit (non-unicode)
strings in the file.
<p>Many messages store their strings as unicode, which is
nice and easy. Some use one-byte encodings for their
strings, but don't always store the encoding anywhere
helpful in the file.</p>
<p>This method checks for codepage properties, and failing that
looks at the headers for the message, and uses these to
guess the correct encoding for your file.</p>
<p>Bug #49441 has more on why this is needed</p>
<p>This is taken verbatim from POI (TIKA-1238)
as a temporary workaround to prevent unsupported encoding exceptions</p>
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java