Bug 41704

Summary: Make CSV Data Set Config use specified encoding
Product: JMeter - Now in Github Reporter: Alf Hogemark <alf>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: P2    
Version: 2.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Suggested patch to add encoding to CSV data set

Description Alf Hogemark 2007-02-26 05:39:39 UTC
Currently, the CSV Data Set Config does not allow the user to specify what
character set encoding is used in the csv file which contains the test data to
use in a Jmeter test.

Therefore, the csv data files must have the default system character set
encoding. Currently, it is the java class FileReader which is used to read the
file, and that assumes the default platform character set encoding for the file.

It would be useful to be able to specify the character set encoding used in a
csv data file, so that you can use different encodings. That will also allow you
to use the same data files on different operating systems, which can have
different default character set encodings.
Comment 1 Alf Hogemark 2007-02-26 05:52:58 UTC
Created attachment 19637 [details]
Suggested patch to add encoding to CSV data set

This is a patch agaist SVN
svn.apache.org/repos/asf/jakarta/jmeter/branches/rel-2-2 as of today.

Comments / suggestions to the patch are welcomed.
Comment 2 Sebb 2007-02-26 11:38:41 UTC
Thanks for the contribution.

Looks mostly OK.

However, it changes the public API of the FileServer class, as the reserveFile 
method now has an extra parameter. This could cause 3rd party applications to 
fail. Easy enough to resolve by overloading the method.

Also, the encoding could perhaps be added to the FileEntry class instead of 
using a separate HashMap.

I'll see about adding this - no need to recreate the patch at present.
Comment 3 Sebb 2007-03-10 14:00:07 UTC
Added to SVN. Will be in nightly builds after r516795.
Comment 4 The ASF infrastructure team 2022-09-24 20:37:38 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1869