Bug 41704 - Make CSV Data Set Config use specified encoding
Make CSV Data Set Config use specified encoding
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: HTTP
2.2
All All
: P2 enhancement (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2007-02-26 05:39 UTC by Alf Hogemark
Modified: 2007-03-10 14:00 UTC (History)
0 users



Attachments
Suggested patch to add encoding to CSV data set (11.48 KB, patch)
2007-02-26 05:52 UTC, Alf Hogemark
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.