Created attachment 37371 [details] png of dashboard Hello! I have a problem with encoding when generating a dashboard report. In .csv file the label field is displayed correctly in Russian language, but in Type of error field the text is displayed incorrectly ('\u041A \u0441\u043E\u0436\...'). In the search for the truth, I replaced sampleresult.default.encoding = UTF-8 in jmeter.propertis, I also added this encoding for all my requests. Found such a bug https://bz.apache.org/bugzilla/show_bug.cgi?id=59889 and it went into the release, checked that this patch is in my version .. I generate the report like this: eval $ jmeter -g $ loadReports /report1.csv -o $ loadReports /report or so, if it is launched through teamcity: jmeter -n -t $ {JMETER_PATH} / test-plan / $ {FILE_NAME} .jmx -Jlayer = $ {LAYER} -Jusers = $ {USERS_NUMBER} -l /result/result_$ {FILE_NAME }.jtl -j / result /jmeter_$ {FILE_NAME }.log -e -o / result / report _ $ {FILE_NAME} / Please tell me how i can fix it
Created attachment 37372 [details] csv report
Sorry, I have a mistake in the sentence. In the csv file, the encoding and words are correct, but after generating the report, this field Type of error is generated incorrectly**
The issue is due to this: https://github.com/apache/jmeter/blob/master/src/core/src/main/java/org/apache/jmeter/report/dashboard/JsonizerVisitor.java#L99 Escaping is needed to avoid reserved characters breaking the Javascript code. But the method transforms russian chars into their unicode representation leading to what you see.
Thanks for the answer, I assumed that the matter is somewhere in the root of the Java script. Tell me how I can fix this, as I see, this code snippet is already in visitValueResult, but in version 5.3 I also have broken encoding
Hello, For now all I can propose to you is build your own version of JMeter with the call to escape commented. Keep the replace. Regards
Thank you, in the near future I will add a java script file here that can help other guys who have encountered the same problem
In fact, the problem was in the generation and you can fix it - replace \\ with \. Hastily drew a solution in the form of a bash script: #!/bin/sh _dashPath=$(find -name "dashboard.js") _template='\\\\'; _raplace='\\' _arrFiles=$(echo $_dashPath | tr " " "\n") for x in $_arrFiles do echo "\"$x\"" sed -i -e "s%$_template%$_raplace%g" $x done
*** Bug 64682 has been marked as a duplicate of this bug. ***
Created attachment 37400 [details] Encode JSON special chars, only The attached patch seems to work with the given Russian sample CSV file.
Thank very much, this bug is disapper 3.X . long long ago, i think whether my config wrong, and then i try envthing i can(but not commit this bug) @nonealexq, Thank very much! I got the answer.
Hello Felix, This looks good to me. Thanks for fix Regards
Committed to trunk. Could you test the next nightly and report back, whether it fixed your problems? commit 21128b56ac4fa1f4d9a260b1f0e4ec3cfa7f033b AuthorDate: Fri Aug 21 12:53:01 2020 +0200 Use less aggressive escaping for JSON Strings in reports error messages Bug 64624 --- .../org/apache/jmeter/report/dashboard/JsonizerVisitor.java | 5 +++-- .../apache/jmeter/report/processor/ErrorsSummaryConsumer.java | 11 +++++++++-- xdocs/changes.xml | 1 + 3 files changed, 13 insertions(+), 4 deletions(-)
commit 9a900cb55604c45f7a85dbcd78ba210a17dd9f72 AuthorDate: Sun Aug 30 10:44:47 2020 +0200 Correct test cases for new behaviour of report generation Use less aggressive escaping for JSON Strings in reports error messages Relates to 21128b56ac4fa1f4d9a260b1f0e4ec3cfa7f033b Bugzilla Id: 64624 --- .../org/apache/jmeter/report/processor/ErrorsSummaryConsumerTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
*** Bug 63997 has been marked as a duplicate of this bug. ***
To any of the original reporters. Could you test the current nightlies and report back, if your problems are fixed?
Hi, I'd love to check it out, but can't find the build, tell me where can I download the nightly build with this fix?
Thanks, have a look at https://jmeter.apache.org/nightly.html. Both nightlies and current builds from trunk should work.
Note, that due to current changes of the build infrastructure, the current trunk builds might have been moved to https://ci-builds.apache.org/job/JMeter/job/JMeter-trunk/
Created attachment 37425 [details] beforeFix All OK! Thank you very much for the work done. I attach two files before and after the fix
Created attachment 37426 [details] afterFix