微信公众平台客服接口中文乱码的问题有人遇到过吗?
Which one is it specifically? Is it related to similar functions of url_encode()
url_encode()
// 将请求、响应的编码均设置为UTF-8 request.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8");
This is caused by the json_encode function used when sending the message without using the JSON_UNESCAPED_UNICODE parameter. The correct way to use it is: json_encode($template, JSON_UNESCAPED_UNICODE).
json_encode
JSON_UNESCAPED_UNICODE
json_encode($template, JSON_UNESCAPED_UNICODE)
Which one is it specifically? Is it related to similar functions of
url_encode()
This is caused by the
json_encode
function used when sending the message without using theJSON_UNESCAPED_UNICODE
parameter. The correct way to use it is:json_encode($template, JSON_UNESCAPED_UNICODE)
.