zoukankan      html  css  js  c++  java
  • Jemter响应数据乱码

    问题分析:

      请求响应数据出现中文时,通过查看jemter的察看结果树中的响应数据信息,出现乱码。经过查看jemter的配置文件jmeter.properties发现其默认字符集编码为ISO-8859-1

      

    解决方法:

      ①修改配置文件:

      将jmeter.properties中的sampleresult.default.encoding=ISO-8859-1修改为sampleresult.default.encoding=utf-8

      并且去掉注释#

    # The encoding to be used if none is provided (default ISO-8859-1)
    sampleresult.default.encoding=UTF-8
    

      ②在jemter中添加脚本

      “线程组“右键====》添加====》后置处理器===》BeanShell PostProcessor   然后在脚本矿中输入

    prev.setDataEncoding("UTF-8");
    

     

    保存后发送请求查看响应数据中文出现了,乱码解决掉了。

  • 相关阅读:
    最长递增子序列
    Mit os Lab 2. Memory Management
    [ZZ]实现c协程
    Linux socket IO模型
    emacs简单入门
    令牌桶-流量控制
    GNU Makefile tips
    Linux atomic memory access
    [zz]Linux系统相关shell命令
    state thread
  • 原文地址:https://www.cnblogs.com/staticking/p/10001324.html
Copyright © 2011-2022 走看看