View | Details | Raw Unified | Return to bug 59889
Collapse All | Expand All

(-)src/core/org/apache/jmeter/report/core/AbstractSampleWriter.java (-3 / +9 lines)
Lines 25-32 Link Here
25
import java.io.PrintWriter;
25
import java.io.PrintWriter;
26
import java.io.UnsupportedEncodingException;
26
import java.io.UnsupportedEncodingException;
27
import java.io.Writer;
27
import java.io.Writer;
28
import java.nio.charset.StandardCharsets;
28
29
29
import org.apache.commons.lang3.Validate;
30
import org.apache.commons.lang3.Validate;
31
import org.apache.jmeter.save.SaveService;
32
import org.apache.jorphan.logging.LoggingManager;
30
import org.apache.jorphan.util.JOrphanUtils;
33
import org.apache.jorphan.util.JOrphanUtils;
31
34
32
/**
35
/**
Lines 45-51 Link Here
45
48
46
    private static final int BUF_SIZE = 10000;
49
    private static final int BUF_SIZE = 10000;
47
50
48
    private static final String CHARSET = "ISO8859-1";
51
    private static final String CHARSET = SaveService.getFileEncoding(StandardCharsets.UTF_8.displayName());
52
    
53
    private static org.apache.log.Logger log = LoggingManager.getLoggerForClass();
49
54
50
    /** output writer to write samples to */
55
    /** output writer to write samples to */
51
    protected PrintWriter writer;
56
    protected PrintWriter writer;
Lines 72-78 Link Here
72
77
73
    /**
78
    /**
74
     * Instructs this sample writer to write samples on the specified output
79
     * Instructs this sample writer to write samples on the specified output
75
     * with ISO8859-1 encoding
80
     * with UTG-8 encoding. The encoding can be overriden by the user through
81
     * {@link SaveService#getFileEncoding(String)}
76
     * 
82
     * 
77
     * @param out
83
     * @param out
78
     *            The output stream on which sample should be written
84
     *            The output stream on which sample should be written
Lines 83-89 Link Here
83
        try {
89
        try {
84
            setWriter(new OutputStreamWriter(out, CHARSET));
90
            setWriter(new OutputStreamWriter(out, CHARSET));
85
        } catch (UnsupportedEncodingException e) {
91
        } catch (UnsupportedEncodingException e) {
86
            // ignore iso8859-1 always supported
92
            log.warn("Unsupported CHARSET: " + CHARSET, e);
87
        }
93
        }
88
    }
94
    }
89
95
(-)src/core/org/apache/jmeter/report/core/CsvSampleReader.java (-1 / +3 lines)
Lines 25-33 Link Here
25
import java.io.IOException;
25
import java.io.IOException;
26
import java.io.InputStreamReader;
26
import java.io.InputStreamReader;
27
import java.io.UnsupportedEncodingException;
27
import java.io.UnsupportedEncodingException;
28
import java.nio.charset.StandardCharsets;
28
29
29
import org.apache.jmeter.samplers.SampleSaveConfiguration;
30
import org.apache.jmeter.samplers.SampleSaveConfiguration;
30
import org.apache.jmeter.save.CSVSaveService;
31
import org.apache.jmeter.save.CSVSaveService;
32
import org.apache.jmeter.save.SaveService;
31
import org.apache.jmeter.util.JMeterUtils;
33
import org.apache.jmeter.util.JMeterUtils;
32
import org.apache.jorphan.logging.LoggingManager;
34
import org.apache.jorphan.logging.LoggingManager;
33
import org.apache.jorphan.util.JOrphanUtils;
35
import org.apache.jorphan.util.JOrphanUtils;
Lines 46-52 Link Here
46
    private static final Logger LOG = LoggingManager.getLoggerForClass();
48
    private static final Logger LOG = LoggingManager.getLoggerForClass();
47
    private static final int BUF_SIZE = 10000;
49
    private static final int BUF_SIZE = 10000;
48
50
49
    private static final String CHARSET = "ISO8859-1";
51
    private static final String CHARSET = SaveService.getFileEncoding(StandardCharsets.UTF_8.displayName());
50
52
51
    private static final char DEFAULT_SEPARATOR =
53
    private static final char DEFAULT_SEPARATOR =
52
            JMeterUtils.getPropDefault("jmeter.save.saveservice.default_delimiter", ",").charAt(0); //$NON-NLS-1$ //$NON-NLS-2$
54
            JMeterUtils.getPropDefault("jmeter.save.saveservice.default_delimiter", ",").charAt(0); //$NON-NLS-1$ //$NON-NLS-2$

Return to bug 59889