search

Home  >  Q&A  >  body text

python - 微信公众平台客服接口中文乱码?

微信公众平台客服接口中文乱码的问题有人遇到过吗?

巴扎黑巴扎黑2778 days ago1067

reply all(3)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 13:52:32

    Which one is it specifically? Is it related to similar functions of url_encode()

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 13:52:32

    // 将请求、响应的编码均设置为UTF-8  
    request.setCharacterEncoding("UTF-8");  
    response.setCharacterEncoding("UTF-8");  
    

    reply
    0
  • 迷茫

    迷茫2017-04-17 13:52:32

    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).

    reply
    0
  • Cancelreply