LoadRunner的中文乱码显示解决方法

本文介绍了LoadRunner中出现中文乱码的两种常见情况及解决方法。一是录制脚本中的中文乱码,可通过修改VirtualUserGen的脚本编码格式解决;二是服务器返回的中文信息为乱码,可通过调整web.config文件或在default.cfg中设置UTF8InputOutput参数来解决。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

LoadRunner的中文乱码存在以下两个方面。需要根据实际情况有针对性的去解决: 
1、录制的脚本中存在中文乱码 
这里写图片描述 
该问题是很多LoadRunner初学者碰到的问题,网上也有很多的解决方法,这里就简单的列举下解决方法: 
A、修改Virtual User Gen的脚本编码格式,路径(Tools->Recoding Options -> Advanced -> Support charset -> UTF-8) 
这里写图片描述 
2、服务器返回的中文信息为乱码 
这里写图片描述 
A、针对于BS系统,可修改web.config文件,在system.web节点中加入

<code class="hljs xml has-numbering" style="display: block; padding: 0px; background-color: transparent; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background-position: initial initial; background-repeat: initial initial;"><span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"><<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">globalization</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">requestEncoding</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"gb2312"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">responseEncoding</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"gb2312"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">fileEncoding</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"gb2312"</span>/></span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul>

B、修改脚本目录下的文件default.cfg,在[WEB]中添加UTF8InputOutput=1

这里写图片描述 
这里写图片描述 
这里写图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值