From 7f61586289e2aaf8b42bfbed55f623d5e9d2695b Mon Sep 17 00:00:00 2001 From: Chris Jaekl Date: Sat, 12 Dec 2015 23:09:48 +0900 Subject: [PATCH] DM_DEFAULT_ENCODING: Be explicit that our HTML gets written in UTF-8. --- prod/net/jaekl/cfb/analyze/HtmlReport.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); } } -- 2.39.2