apache / jmeter

Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services
https://jmeter.apache.org/
Apache License 2.0
8.3k stars 2.09k forks source link

Japanease Shift-JIS string contain some specific character cause text broken at script recording. #5225

Open asfimport opened 4 years ago

asfimport commented 4 years ago

Takashi Imoto (Bug 64075): JMeter5.2 fixed Japanease Shift-JIS problem, by setting Encode at script record. as #63130.

But Japanease Character that contain some specific character like "新" case, text broke.

I attached sample case as JSP file. It's file run on tomcat, and setting encoding as "Shift-JIS" at JMeter, then record sample case, it cause text broken.

I think it is due to difference of encoding specification of browser and Java. I replace encoding library to apache encoding library, it can resolve.

We already create fixed patch, if it recognize bug, we will pull request this patch.

Created attachment index.jsp: Sample case of Shift-JIS text broken.

index.jsp ```` <%@ page contentType="text/html; charset=Windows-31J" pageEncoding="UTF-8" %> <% String search = "新規"; if (request.getParameter("search") != null) { search = new String(request.getParameter("search").getBytes("8859_1"), "Windows-31J"); } %>

Please click on submit button to send the request



1.新規

2.てすと

Back to page ````

Severity: critical OS: All

Duplicates:

asfimport commented 4 years ago

@pmouawad (migrated from Bugzilla): Hello, Yes please provide a PR with JUnit and non regression testing as this part is very sensitive.

Thank you Regards