diff --git a/src/java/davmail/exchange/ews/EWSMethod.java b/src/java/davmail/exchange/ews/EWSMethod.java index adf230be..1d7f5544 100644 --- a/src/java/davmail/exchange/ews/EWSMethod.java +++ b/src/java/davmail/exchange/ews/EWSMethod.java @@ -510,7 +510,11 @@ public abstract class EWSMethod extends PostMethod { */ public void checkSuccess() throws EWSException { if (errorDetail != null) { - throw new EWSException(errorDetail + "\n request: " + new String(generateSoapEnvelope())); + try { + throw new EWSException(errorDetail + "\n request: " + new String(generateSoapEnvelope(), "UTF-8")); + } catch (UnsupportedEncodingException e) { + throw new EWSException(e.getMessage()); + } } }