|
使用web_custom_request提交josn请求时,josn中的中文乱码导致报错,使用lr_convert_string_encoding转码仍然不好使,请问如何能让json中的中文不乱码?
代码如下:
Action()
{
web_reg_save_param("newParam",
"LB/IC=returnCode\":",
"RB/IC=}",
LAST);
lr_convert_string_encoding("{\"张三\",\"address\":\"北京\",\"prvId\":\"11\"}",LR_ENC_SYSTEM_LOCALE,LR_ENC_UTF8,"str");
web_custom_request("account",
"Method=POST",
"Resource=1",
"URL=http://192.168.20.181:8080/sc.regulate/upload",
"RecContentType=application/json",
"EncType=application/json",
"Mode=HTTP",
RAW_BODY_START,
lr_eval_string("{str}"),
500,
RAW_BODY_END,
LAST);
lr_error_message(lr_eval_string("{newParam}"));
return 0;
}
|
|