]> jaekl.net Git - cfb.git/commitdiff
DM_DEFAULT_ENCODING: Be explicit that our HTML gets written in UTF-8.
authorChris Jaekl <cejaekl@yahoo.com>
Sat, 12 Dec 2015 14:09:48 +0000 (23:09 +0900)
committerChris Jaekl <cejaekl@yahoo.com>
Sat, 12 Dec 2015 14:09:48 +0000 (23:09 +0900)
prod/net/jaekl/cfb/analyze/HtmlReport.java

index e2e76cb4bae3b1e2f678fd93046931f81c3000ab..c1ff762d60e6b052a4cafa91a9495439a1f7670c 100644 (file)
@@ -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();
                }
        }