Hi! When attempting to use ReponseAssertion to search for national characters (in UTF-8) found two bugs that prevent it: * HttpSampler forget to copy contentType and cataEncoding in case of following redirects * ResponseAssertion converts byte[] to String using just default constructor (thus converting characters using Java system default encoding) - wich is wrong. Above patch fixes both issues.
Created attachment 16732 [details] jmeter_i18n_assertion.patch Patch to fix bugs mentioned in description.
Hi! Found more problematic objects (for example RegexFunction does use String(byte[]) again). Working on better patch. I have an idea to add new method SampleResult.getResponseDataAsString() that would be handy for proper charset conversion (as does that patch for ResponseAssertion now).
Created attachment 16733 [details] jmeter_i18n_rev2.patch Hi! Here is more advanced patch - it fixes charset handling for both ResponseAssertion and RegexFunction. There is new convenience method SampleResult.responseDataAsString() that does the trick. Note: that patch works for me, but all daring testers are encouraged to try this piece of code.
Created attachment 16734 [details] jmeter_i18n_rev3.patch - just fixed rogue "Only in..." diff messages
thanks for the information. I'll try to get to it tonight if I have time. peter lin
Thanks. The Response Assertion problem was already fixed in bug 25052. Other fixes applied (though I did not add the convenience function).
I've added your name to the contributer page, thanks again for submitting the patch. http://wiki.apache.org/jakarta-jmeter/JMeterCommitters?action=show peter lin
Hi! Tested rel-2-1 branch - it works well. Closing that bug. Thank you!
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1624