Bug 50568 - Function __FileToString(): Could not read file when encoding option is blank/empty
Function __FileToString(): Could not read file when encoding option is blank/...
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
2.4
PC All
: P2 normal (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-01-10 16:20 UTC by Milamber
Modified: 2011-01-10 16:27 UTC (History)
0 users



Attachments
Patch (691 bytes, patch)
2011-01-10 16:21 UTC, Milamber
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Milamber 2011-01-10 16:20:44 UTC
When you use __FileToString() function without add a encoding charset to read the file, JMeter generate this error in jmeter.log :

2011/01/10 20:41:52 WARN  - jmeter.functions.FileToString: Could not read file: /home/milamber/file.txt  
2011/01/10 20:41:52 INFO  - jmeter.threads.JMeterThread: Stopping Thread: org.apache.jorphan.util.JMeterStopThreadException: End of sequence 
2011/01/10 20:41:52 INFO  - jmeter.threads.JMeterThread: Stop Thread detected by thread: Groupe d'unités 1-1 

${__FileToString(/home/milamber/file.txt,,MY_FILE)}

If you add a charset, no error.
${__FileToString(/home/milamber/file.txt,UTF-8,MY_FILE)}



Thanks to Fabrice B. from French user group to catch this bug.
Comment 1 Milamber 2011-01-10 16:21:35 UTC
Created attachment 26473 [details]
Patch
Comment 2 Milamber 2011-01-10 16:27:17 UTC
Fixed.

URL: http://svn.apache.org/viewvc?rev=1057376&view=rev
Log:
Bug 50568 - Function __FileToString(): Could not read file when encoding option is blank/empty

Modified:
    jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileToString.java
    jakarta/jmeter/trunk/xdocs/changes.xml