JMeter - JSR223 Sampler missing character encoding

user7294900

When I use JSR223 Sampler and print non English characters as อักษรไทย

I can't be seen in output, converted to ????????

I see that the encoding isn't set to UTF-8 in Sampler Result

SampleResult fields:
ContentType: 
DataEncoding: windows-1255

Can I set JSR223 Sampler output encoding to UTF-8?

Dmitri T

Most likely it's the problem of the destination you're printing this stuff to, if you use log shorthand which prints an arbitrary line to jmeter.log file you should normally see non-English characters

If you're writing non-ANSI text into a custom file to be on the safe side you could explicitly define encoding like:

new File("foo.txt").newOutputStream().withWriter("UTF-8") { writer ->
    writer.write('อักษรไทย')
}

Demo:

enter image description here

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

JMeter - groovy MultipleCompilationErrorsException in JSR223 Sampler

Jmeter - declare array variable in one JSR223 Sampler in order to access it in another JSR223 Sampler

JMeter Javascript language not available for JSR223 Sampler and WebDriver Sampler

Problem in JSR223 script JSR223 Sampler, while connecting to Azure Cosmos DB from Jmeter

JMeter - Exception when using Beanshell as JSR223 Sampler with file

Jmeter JSR223 Sampler - Unable to Write Data To CSV File

JMeter - Access JSR223 variable in HTTP sampler

Create JMeter Test Plan using JSR223 Sampler

Read json file in jsr223 sampler in jmeter and extract data

Generate random values in JSR223 sampler in JMeter

Code in JMeter JSR223 Sampler comments is executed

How to update User Defined Variable in JMeter in JSR223 Sampler?

"Precondition Failed" for post request in JSR223 Sampler in JMeter

upload a file using jsr223 sampler getting failure on JMeter

Jmeter: Access all results from all threadGroups from JSR223 Sampler or BeanShell Sampler in TeardownThread

JMeter Load Tesing::Moving from WebDriver sampler To JSR223 sampler with groovy

JMeter saving document to MongoDb with Java BeanShell: Problem in JSR223 script Sampler

JMeter - Error when using Jython/Python Engine in JSR223 Sampler "Cannot find Engine"

Get all previous sampler results (redirects) in JMeter's JSR223 Assertion

Trouble accessing properties set by JSR223 Sampler in JMeter non-GUI mode

Error when trying to execute existing Jmeter script in Maven project that is written in Jsr223 sampler in groovy

File declaration throwing error in JMeter, JSR223 sampler with groovy script

Difference between a JSR223 Sampler and JSR223 PreProcessor

Extract value from jsr223 sampler

JMeter JSR223 PostProcessor GET COOKIE

Add sampler is missing in jmeter UI

unexpected token while reading xml to string in JSR223 sampler

In what ways can I access a variable defined in a JSR223 Sampler from inside a child JSR223 PostProcessor?

Jmeter log only HTTPSampler with JSR223 Listener