Jmeter响应数据为乱码的处理

jmeter新手,跟着教程,发现响应的数据为乱码,百度到两种方法:

方法一:在相应节点的下方,添加后置处理器-BeanShell PostProcessor    

   添加一句代码:prev.setDataEncoding("UTF-8")

   好像需要Ctrl+s一下,才能成功

方法二:在/bin/jmeter.properties中sampleresult.default.encoding默认为ISO-8859-1,将参数修改为

sampleresult.default.encoding=utf-8 即可

同时注意将注释符号#去掉,否则不会生效

---------------------

关联的时候出现这个错误:java.net.URISyntaxException: Illegal character in path at index 37: http://www.weather.com.cn/weather2d/${citycode}.shtml

处理方法:

在外层,添加后置处理器-BeanShell PostProcessor    

   添加一句代码:prev.setDataEncoding("UTF-8")

 

 

 

解决了我这里的问题!

posted on 2017-08-01 10:21  if-初见  阅读(358)  评论(0编辑  收藏  举报