You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by GitBox <gi...@apache.org> on 2022/10/05 20:06:46 UTC

[GitHub] [jmeter] vdaburon commented on issue #5701: JMeter does not support files with Chinese/Japanese characters

vdaburon commented on issue #5701:
URL: https://github.com/apache/jmeter/issues/5701#issuecomment-1265646252

   Hi,
   I propose a solution to choose how to encode the file name in for a POST Multipart (Java Client implementation)
   1) &lt;filename&gt; and use Content encoding = ISO-8859-1 (Don't use Sampler Content encoding)
   2) &lt;filename&gt; and use Sampler Content Encoding Value (likes UTF-8 or ISO-8859-15)
   3) URLEncoder.encode(&lt;filename&gt;\",&lt;Sampler Content Encoding&gt;\") and use Sampler Content Encoding Value (likes UTF-8 or ISO-8859-15)
   4) &lt;filename>; filename*=UTF-8''URLEncoder.encode(&lt;filename&gt;\",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)  &lt;filename&gt; and use Sampler Content Encoding Value= UTF-8
   <pre>
   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
   
   <actual file content, not shown here>
   -----------------------------7d159c1302d0y0--
   </pre>
   4) &lt;filename&gt;; filename*=UTF-8''URLEncoder.encode(&lt;filename&gt;\",UTF-8\") 
   <pre>
   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
   
   <actual file content, not shown here>
   -----------------------------7d159c1302d0y0--
   </pre>
   
   New GUI for Files upload with a ComboBox to choose the filename encode method to use
   
   
   
   ![HttpRequest_FileUpload_Combobox_greek_filename](https://user-images.githubusercontent.com/1881617/193615464-e7d493aa-212b-40f8-84ea-9ae200c4d16d.png)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org