junit: do not loose encoding when test names is written to file (IDEABKL-5952)
authoranna <Anna.Kozlova@jetbrains.com>
Tue, 18 Jan 2011 10:51:21 +0000 (11:51 +0100)
committeranna <Anna.Kozlova@jetbrains.com>
Tue, 18 Jan 2011 11:09:10 +0000 (12:09 +0100)
plugins/junit/src/com/intellij/execution/junit/TestObject.java

index c356c86eb29a4bd6b1e964399202c78e4f47effb..fd0e508e95bc70bfdc5575ec66d5bc662f2d12b6 100644 (file)
@@ -363,7 +363,7 @@ public abstract class TestObject implements JavaCommandLine {
         myJavaParameters.getProgramParametersList().add("@" + myTempFile.getAbsolutePath());
       }
 
-      final PrintWriter writer = new PrintWriter(new FileWriter(myTempFile));
+      final PrintWriter writer = new PrintWriter(myTempFile, "UTF-8");
       try {
         writer.println(junit4 ? JUnitStarter.JUNIT4_PARAMETER : "-junit3");
         writer.println(packageName);