JMeter变量编码不正确

问题描述

我在Windows 10上使用Jmeter 5.3。我面临以下问题: 我将HTTP请求设置为内容编码:UTF-8。在回复中,我看到了想要的内容

"name": "Győr,autóbusz-állomás",

我尝试使用JSON Extractor提取响应,但是断言失败,并且在调试采样器中提取名称如下所示:

origin.name=Gy�r,aut�busz-�llom�s

如何在UTF-8中提取变量以在断言中使用它?

谢谢你的建议,

解决方法

我无法重现您的问题:

enter image description here

使用“调试采样器”仔细检查file.encoding系统属性值,您应该拥有UTF-8

enter image description here

如果不这样做,请尝试以以下方式启动JMeter:

jmeter -Dfile.encoding=UTF-8

如果有帮助-将file.encoding=UTF-8行添加到 system.properties 文件(位于JMeter安装目录的“ bin”文件夹中,将需要重新启动JMeter来拾取该属性。

更多信息: