Skip to content

Commit

Permalink
[JENKINS-23531] preserve charsets (default java encoding: not UTF-8)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilleb committed Apr 9, 2015
1 parent 8f1f64c commit 2566230
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
13 changes: 0 additions & 13 deletions .idea/libraries/Maven__xmlunit_xmlunit_1_1.xml

This file was deleted.

5 changes: 3 additions & 2 deletions src/main/java/hudson/plugins/mstest/ContentCorrector.java
@@ -1,6 +1,7 @@
package hudson.plugins.mstest;

import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
Expand All @@ -21,11 +22,11 @@ public ContentCorrector(String file)

public String fix() throws IOException
{
String filename = Integer.toString(randInt(1000, 1000000)) + ".rnd";
String filename = Integer.toString(randInt(1000, 1000000)) + ".trx";
File inFile = new File(file);
File parent = inFile.getParentFile();
File outfile = new File(parent, filename);
PrintWriter out = new PrintWriter(outfile);
PrintWriter out = new PrintWriter(new OutputStreamWriter(new FileOutputStream(outfile), StandardCharsets.UTF_8));
BufferedReader in = new BufferedReader(new FileReader(inFile));
String line = in.readLine();
while (line != null) {
Expand Down

0 comments on commit 2566230

Please sign in to comment.