Bug 59889 - Dashboard cannot display Japanese(and maybe also Chinese) characters.
Summary: Dashboard cannot display Japanese(and maybe also Chinese) characters.
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 3.0
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-21 15:03 UTC by Kimono
Modified: 2016-07-28 17:36 UTC (History)
1 user (show)



Attachments
jmeter.log (10.55 KB, text/plain)
2016-07-22 13:50 UTC, Kimono
Details
jmeter.properties(not modified from original) (50.99 KB, text/x-matlab)
2016-07-22 13:51 UTC, Kimono
Details
user.properties(not modified from original) (5.28 KB, text/plain)
2016-07-22 13:52 UTC, Kimono
Details
result jtl file(UTF-8) (4.15 KB, text/plain)
2016-07-22 13:52 UTC, Kimono
Details
Problem and Expected (23.86 KB, image/png)
2016-07-22 13:55 UTC, Kimono
Details
Simple test plan to produce a csv file with japanese characters (4.74 KB, application/xml)
2016-07-24 12:18 UTC, Felix Schumacher
Details
Change encoding to UTF-8 for CSV Files in the report package (2.91 KB, patch)
2016-07-24 12:27 UTC, Felix Schumacher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kimono 2016-07-21 15:03:25 UTC
Dashboard cannot display Japanese(and maybe also Chinese) characters.

This is because CHARSET is specified as "ISO8859-1" in CsvSampleReader.java.
It should be taken from SaveService.

CsvSampleReader.java
----
private static final String CHARSET = "ISO8859-1";
-> private static final String CHARSET = SaveService.getFileEncoding("UTF-8");
Comment 1 Philippe Mouawad 2016-07-21 20:53:56 UTC
Hi,
Thanks for report.
could you provide a sample csv file that reproduces the issue ?
Also provide user.properties, jmeter.properties and jmeter.log

Thanks
Regards
Comment 2 Kimono 2016-07-22 13:50:18 UTC
Created attachment 34062 [details]
jmeter.log
Comment 3 Kimono 2016-07-22 13:51:34 UTC
Created attachment 34063 [details]
jmeter.properties(not modified from original)
Comment 4 Kimono 2016-07-22 13:52:11 UTC
Created attachment 34064 [details]
user.properties(not modified from original)
Comment 5 Kimono 2016-07-22 13:52:51 UTC
Created attachment 34065 [details]
result jtl file(UTF-8)
Comment 6 Kimono 2016-07-22 13:55:25 UTC
Created attachment 34066 [details]
Problem and Expected
Comment 7 Kimono 2016-07-22 13:59:30 UTC
Thanks for your reply.

Additional image/pnf file is screen capture of expected result.
Comment 8 Felix Schumacher 2016-07-24 12:18:28 UTC
Created attachment 34070 [details]
Simple test plan to produce a csv file with japanese characters

The problem seems to be, that the csv (jtl) files are written using the ResultCollector, which uses UTF-8 as default. Trouble is, that they are read using CSVSampleReader (which defaults to ISO-8859-1).

When we change CSVSampleReader to UTF-8, we should consider changing CSVSampleWriter to UTF-8, too.

CSVSampleWriter inherits from AbstractSampleWriter, which initialises its writers with ISO-8859-1. Should we change AbstractSampleWriter, too? Or only change CSVSampleWriter?

What do you think?
Comment 9 Felix Schumacher 2016-07-24 12:27:57 UTC
Created attachment 34071 [details]
Change encoding to UTF-8 for CSV Files in the report package
Comment 10 Philippe Mouawad 2016-07-24 13:05:04 UTC
+1 for your patch Felix
Comment 11 Kimono 2016-07-25 13:35:40 UTC
Felix's patch solves the problem.
Thanks.
Comment 12 Felix Schumacher 2016-07-28 17:36:41 UTC
Date: Thu Jul 28 17:36:07 2016
New Revision: 1754436

URL: http://svn.apache.org/viewvc?rev=1754436&view=rev
Log:
Change encoding to UTF-8 in reports for dashboard.

Bugzilla Id: 59889

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/report/core/AbstractSampleWriter.java
    jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvSampleReader.java
    jmeter/trunk/xdocs/changes.xml