JMeter does not support files with Chinese/Japanese characters
Ziven (Bug 66251): It appears hard coded ENCODING with ISO_8859_1 in file
src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/sampler/PostWriter.java as following: public static final String ENCODING = StandardCharsets.ISO_8859_1.name()
Severity: major OS: Linux
Ziven (migrated from Bugzilla): Created attachment 1-UploadFileWithChineseCharactersInFilename.png: Choose a File With Chinese Characters In Filename to upload
Ziven (migrated from Bugzilla): Created attachment 2-CantShowChineseCharactersAsExpected.png: Step2. After the upload, it cant show Chinese Characters as expected
Hi, I propose a solution to choose how to encode the file name in for a POST Multipart (Java Client implementation)
- <filename> and use Content encoding = ISO-8859-1 (Don't use Sampler Content encoding)
- <filename> and use Sampler Content Encoding Value (likes UTF-8 or ISO-8859-15)
- URLEncoder.encode(<filename>",<Sampler Content Encoding>") and use Sampler Content Encoding Value (likes UTF-8 or ISO-8859-15)
- <filename>; filename*=UTF-8''URLEncoder.encode(<filename>",UTF-8") and use Sampler Content Encoding Value= UTF-8
I think with this list choices, you can POST a file with a correct filename encode
E.g. with filename contains Greek Alphabet : 2) <filename> and use Sampler Content Encoding Value= UTF-8
POST http://localhost:8081/test/upload POST data: -----------------------------7d159c1302d0y0 Content-Disposition: form-data; name="file1"; filename="Ελλάδα.txt" Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Content-Transfer-Encoding: binary-----------------------------7d159c1302d0y0--
- <filename>; filename*=UTF-8''URLEncoder.encode(<filename>",UTF-8")
POST http://localhost:8081/test/upload POST data: -----------------------------7d159c1302d0y0 Content-Disposition: form-data; name="file1"; filename="Ελλάδα.txt; filename*=UTF-8''%CE%95%CE%BB%CE%BB%CE%AC%CE%B4%CE%B1.txt" Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Content-Transfer-Encoding: binary-----------------------------7d159c1302d0y0--
New GUI for Files upload with a ComboBox to choose the filename encode method to use

Thank you @asfimport for the migration and @vdaburon for your proposal!
Duplicate of https://github.com/apache/jmeter/issues/4546