From: Chris Jaekl Date: Sat, 12 Dec 2015 14:09:48 +0000 (+0900) Subject: DM_DEFAULT_ENCODING: Be explicit that our HTML gets written in UTF-8. X-Git-Url: https://jaekl.net/gitweb/?a=commitdiff_plain;h=7f61586289e2aaf8b42bfbed55f623d5e9d2695b;p=cfb.git DM_DEFAULT_ENCODING: Be explicit that our HTML gets written in UTF-8. --- diff --git a/prod/net/jaekl/cfb/analyze/HtmlReport.java b/prod/net/jaekl/cfb/analyze/HtmlReport.java index e2e76cb..c1ff762 100644 --- a/prod/net/jaekl/cfb/analyze/HtmlReport.java +++ b/prod/net/jaekl/cfb/analyze/HtmlReport.java @@ -1,12 +1,12 @@ package net.jaekl.cfb.analyze; import java.io.File; -import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintWriter; import net.jaekl.cfb.CfbBundle; import net.jaekl.cfb.store.Location; +import net.jaekl.cfb.util.Command; import net.jaekl.cfb.xml.BugInstance; import net.jaekl.cfb.xml.messages.BugPattern; import net.jaekl.cfb.xml.messages.MessageCollection; @@ -27,10 +27,10 @@ public class HtmlReport { public void write(File output) throws IOException { - try ( FileOutputStream fos = new FileOutputStream(output); - PrintWriter pw = new PrintWriter(fos); ) + try ( PrintWriter pw = new PrintWriter(output, Command.UTF_8) ) { write(pw); + pw.flush(); } }