LoadRunner 中文乱码问题解决办法

陈磊

#LoadRunner 中文乱码问题解决办法

##Response的中文

	web_reg_save_param("Allresponse",
								   "LB=",
									"RB=",
									LAST); 
	web_custom_request("transmit",
									   "Method=POST", 			                       
									   "URL=http://58.61.30.125:8035/Merchant/transmit.json", "Body=",//参数拼接在这里 LAST);
									   lr_convert_string_encoding(lr_eval_string("{Allresponse}"),
									   "utf-8","gb2312","enCodeAllresponse");
	 lr_error_message("the Allresponse is:\r\n%s",lr_eval_string("{enCodeAllresponse}"),LAST);

Request 的中文

lr_convert_string_encoding(lr_eval_string("XXXX"),"gb2312","utf-8","ResqustParam");

web_reg_save_param_ex(
	  "ParamName=TagRespons",
	  "LB={ResqustParam}",
	  "RB=",
	  "NotFound=error",
	  SEARCH_FILTERS,
	  LAST);

 web_url("test.js",
	  "URL=http://58.61.30.125:70/Scripts/Home/infor.js",
	  "Resource=1",
	  "RecContentType=application/x-javascript",
	  "Referer=http://58.61.30.125:70:8080/",
	  "Snapshot=t2.inf",
	  LAST);