Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JMeter sample response encoding

I'm having problems with JMeter's handling of unicode characters. When a sample response contains such characters, they are returned corrupted. For example, I'm using the dummy sampler with this response data:

Hauptschule Sankt Pýlten, Pottenbrunn

And JMeter returns:

Hauptschule Sankt P�lten, Pottenbrunn

I've set these properties in saveservice.properties and jmeter.properties respectively:

_file_encoding=UTF-8
sampleresult.default.encoding=UTF-8

but it makes no difference.

Any ideas on how to fix this? Thanks

like image 598
ddario Avatar asked Dec 13 '11 11:12

ddario


2 Answers

Right property to set / change in jmeter.properties is

 sampleresult.default.encoding=UTF-8

(if omitted default is ISO-8859-1)

like image 50
m c Avatar answered Sep 19 '22 15:09

m c


Add a BSF post processing element to the sampler with the following script:

prev.setDataEncoding("UTF-8")

That's what worked for me.

like image 23
Paweł Sokołowski Avatar answered Sep 17 '22 15:09

Paweł Sokołowski