Commit ca52bdef authored by Mickaël Guessant's avatar Mickaël Guessant

From coverity: more encoding fixes

git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@2274 3d1905a2-6b24-0410-a738-b14d5a86fcbd
parent 3cbb561d
......@@ -225,7 +225,7 @@ public final class DavGateway {
HttpClient httpClient = DavGatewayHttpClientFacade.getInstance(HTTP_DAVMAIL_SOURCEFORGE_NET_VERSION_TXT);
int status = httpClient.executeMethod(getMethod);
if (status == HttpStatus.SC_OK) {
versionReader = new BufferedReader(new InputStreamReader(getMethod.getResponseBodyAsStream()));
versionReader = new BufferedReader(new InputStreamReader(getMethod.getResponseBodyAsStream(), "UTF-8"));
version = versionReader.readLine();
LOGGER.debug("DavMail released version: " + version);
}
......
......@@ -2608,16 +2608,16 @@ public abstract class ExchangeSession {
.append((after ^ fromServer) ? "-server" : "-client")
.append(".ics");
if ((icsBody != null) && (icsBody.length() > 0)) {
FileWriter fileWriter = null;
OutputStreamWriter writer = null;
try {
fileWriter = new FileWriter(filePath.toString());
fileWriter.write(icsBody);
writer = new OutputStreamWriter(new FileOutputStream(filePath.toString()), "UTF-8");
writer.write(icsBody);
} catch (IOException e) {
LOGGER.error(e);
} finally {
if (fileWriter != null) {
if (writer != null) {
try {
fileWriter.close();
writer.close();
} catch (IOException e) {
LOGGER.error(e);
}
......@@ -3301,7 +3301,7 @@ public abstract class ExchangeSession {
GetMethod optionsMethod = new GetMethod("/owa/?ae=Options&t=About");
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 email and alias
......
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