Author: agomes
Date: Sat Sep 16 21:48:06 2017
New Revision: 1808595
URL: http://svn.apache.org/viewvc?rev=1808595&view=rev
Log:
BUG61527 - CSV data set config : Add a list for main file encoding values for
File encoding attribute
Modified:
jmeter/trunk/bin/jmeter.properties
jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSetBeanInfo.java
jmeter/trunk/xdocs/changes.xml
jmeter/trunk/xdocs/images/screenshots/csvdatasetconfig.png
jmeter/trunk/xdocs/usermanual/properties_reference.xml
Modified: jmeter/trunk/bin/jmeter.properties
URL:
http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter.properties?rev=1808595&r1=1808594&r2=1808595&view=diff
==============================================================================
--- jmeter/trunk/bin/jmeter.properties (original)
+++ jmeter/trunk/bin/jmeter.properties Sat Sep 16 21:48:06 2017
@@ -906,6 +906,9 @@ beanshell.server.file=../extras/startup.
# String to return at EOF (if recycle not used)
#csvdataset.eofstring=<EOF>
+#list in
https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html
+csvdataset.file.encoding=UTF-8|UTF-16|ISO-8859-15|US-ASCII
+
#---------------------------------------------------------------------------
# LDAP Sampler configuration
Modified:
jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSetBeanInfo.java
URL:
http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSetBeanInfo.java?rev=1808595&r1=1808594&r2=1808595&view=diff
==============================================================================
---
jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSetBeanInfo.java
(original)
+++
jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSetBeanInfo.java
Sat Sep 16 21:48:06 2017
@@ -23,6 +23,8 @@ import java.beans.PropertyDescriptor;
import org.apache.jmeter.testbeans.BeanInfoSupport;
import org.apache.jmeter.testbeans.gui.FileEditor;
import org.apache.jmeter.testbeans.gui.TypeEditor;
+import org.apache.jmeter.util.JMeterUtils;
+import org.apache.jorphan.util.JOrphanUtils;
public class CSVDataSetBeanInfo extends BeanInfoSupport {
@@ -64,10 +66,10 @@ public class CSVDataSetBeanInfo extends
p.setValue(NOT_EXPRESSION, Boolean.TRUE);
p.setPropertyEditorClass(FileEditor.class);
- p = property(FILE_ENCODING);
+ p = property(FILE_ENCODING, TypeEditor.ComboStringEditor);
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, ""); //$NON-NLS-1$
- p.setValue(NOT_EXPRESSION, Boolean.TRUE);
+ p.setValue(TAGS, getListFileEncoding());
p = property(VARIABLE_NAMES);
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
@@ -124,4 +126,13 @@ public class CSVDataSetBeanInfo extends
System.arraycopy(SHARE_TAGS, 0, copy, 0, SHARE_TAGS.length);
return copy;
}
+
+ /**
+ * Get the mains file encoding
+ * list from
https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html
+ * @return a String[] with the list of file encoding
+ */
+ private String[] getListFileEncoding() {
+ return
JOrphanUtils.split(JMeterUtils.getPropDefault("csvdataset.file.encoding", ""),
"|"); //$NON-NLS-1$
+ }
}
Modified: jmeter/trunk/xdocs/changes.xml
URL:
http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1808595&r1=1808594&r2=1808595&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Sat Sep 16 21:48:06 2017
@@ -114,6 +114,7 @@ Incorporated feed back about unclear doc
<li><bug>61525</bug>OS Process Sampler : Add browser button to Command and
Working directory fields</li>
<li><bug>60156</bug> - TCPSampler : Latency is not measured for TCP
Sampler. Contributed by Ubik Load Pack (support at ubikloadpack.com)</li>
<li><bug>61039</bug>CSV data set config : Add browser button to Filename
field</li>
+ <li><bug>61527</bug>CSV data set config : Add a list for main file
encoding values for File encoding attribute</li>
</ul>
<h3>Controllers</h3>
Modified: jmeter/trunk/xdocs/images/screenshots/csvdatasetconfig.png
URL:
http://svn.apache.org/viewvc/jmeter/trunk/xdocs/images/screenshots/csvdatasetconfig.png?rev=1808595&r1=1808594&r2=1808595&view=diff
==============================================================================
Binary files - no diff available.
Modified: jmeter/trunk/xdocs/usermanual/properties_reference.xml
URL:
http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/properties_reference.xml?rev=1808595&r1=1808594&r2=1808595&view=diff
==============================================================================
--- jmeter/trunk/xdocs/usermanual/properties_reference.xml (original)
+++ jmeter/trunk/xdocs/usermanual/properties_reference.xml Sat Sep 16 21:48:06
2017
@@ -1172,6 +1172,10 @@ JMETER-SERVER</source>
<section name="§-num;.33 CSV DataSet configuration" anchor="csv_dataset">
<properties>
<property name="csvdataset.eofstring">
+ List of file encoding values<br/>
+ Defaults to: <code>platform default</code>
+</property>
+<property name="csvdataset.file.encoding">
String to return at <abbr title="end of file"><code>EOF</code></abbr> (if
recycle not used).<br/>
Defaults to: <code><EOF></code>
</property>