Patch WW-3945

Set default encoding for JSONResult to UTF-8

Now the default encoding is UTF-8 for JSON as should be.
This commit is contained in:
Victor Sosa
2016-01-03 08:05:03 -04:00
parent 38da3f6705
commit f9b7ebb87e
2 changed files with 6 additions and 2 deletions
@@ -386,7 +386,11 @@ public class JasperReportsResult extends StrutsResultSupport implements JasperRe
LOG.error("Error producing {} report for uri {}", format, systemId, e);
throw new ServletException(e.getMessage(), e);
} finally {
conn.close();
try {
conn.close();
} catch (Exception e) {
LOG.warn("Could not close db connection properly", e);
}
}
response.setContentLength(output.size());
@@ -80,7 +80,7 @@ public class JSONResult implements Result {
public static final String DEFAULT_PARAM = null;
private String encoding;
private String defaultEncoding = "ISO-8859-1";
private String defaultEncoding = "UTF-8";
private List<Pattern> includeProperties;
private List<Pattern> excludeProperties;
private String root;