Commit 245e66f7 authored by Mickaël Guessant's avatar Mickaël Guessant

EWS: expect UTF-8 in options responses

git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@2267 3d1905a2-6b24-0410-a738-b14d5a86fcbd
parent a3c39586
......@@ -354,7 +354,7 @@ public class EwsExchangeSession extends ExchangeSession {
)) {
BufferedReader autodiscoverReader = null;
try {
autodiscoverReader = new BufferedReader(new InputStreamReader(getResponseBodyAsStream()));
autodiscoverReader = new BufferedReader(new InputStreamReader(getResponseBodyAsStream(), "UTF-8"));
String line;
// find ews url
//noinspection StatementWithEmptyBody
......@@ -647,7 +647,7 @@ public class EwsExchangeSession extends ExchangeSession {
mimeMessage.writeTo(baos);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Rebuilt message content: " + new String(baos.toByteArray()));
LOGGER.debug("Rebuilt message content: " + new String(baos.toByteArray(), "UTF-8"));
}
mimeContent = baos.toByteArray();
......@@ -2149,7 +2149,7 @@ public class EwsExchangeSession extends ExchangeSession {
GetMethod optionsMethod = new GetMethod("/owa/?ae=Options&t=Regional");
try {
DavGatewayHttpClientFacade.executeGetMethod(httpClient, optionsMethod, false);
optionsPageReader = new BufferedReader(new InputStreamReader(optionsMethod.getResponseBodyAsStream()));
optionsPageReader = new BufferedReader(new InputStreamReader(optionsMethod.getResponseBodyAsStream(), "UTF-8"));
String line;
// find timezone
//noinspection StatementWithEmptyBody
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment