都是utf-8也不可以,还是乱码
订阅消息发送,微信端服务通知接收到中文乱码?[图片] 服务端代码: string Url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token="+ token; var postdata = new { touser = openId, template_id = templeteId, page = "index", data = new { thing1 = new { value = "今日行程" }, date2 = new { value = "2020-03-01" }, thing4 = new { value = "请做好准备,即将出发" } } }; wenXinResult = HttpHelper.HttpPostJson(Url, JsonHelper.Serialize(postdata)); httppost代码: HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url); req.Method = "POST"; req.ContentType = "application/json"; Stream myRequestStream = req.GetRequestStream(); StreamWriter myStreamWriter = new StreamWriter(myRequestStream, Encoding.GetEncoding("gb2312")); myStreamWriter.Write(postDataStr); myStreamWriter.Close(); HttpWebResponse rsp = (HttpWebResponse)req.GetResponse(); if (string.IsNullOrWhiteSpace(rsp.CharacterSet)) { return GetResponseAsString(rsp, Encoding.UTF8); } else { Encoding encoding = Encoding.GetEncoding(rsp.CharacterSet); return GetResponseAsString(rsp, encoding); } 请大神帮我看下那里有问题,感谢!
2020-11-07我这里也出现了 [图片] 始终不行,不知道问题出在哪里
订阅消息推送,服务通知里收到的消息 中文乱码怎么处理?[图片]
2020-11-06