微信公眾平臺客服接口中文亂碼的問題有人遇到過嗎?
Which one is it specifically? Is it related to similar functions of 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)
.