- 微信公众号自动回复文本接口含有中文,显示会乱码
在微信公众号配置接口,按照如下官方DEMO配置,任意输入文字,公众号会回复this is a test 但是将文字换成中文,比如部署成功!就会乱码,返回\u90e8\u7f72\u6210\u529f [图片] 官方样例: <xml> <ToUserName><![CDATA[toUser]]></ToUserName> <FromUserName><![CDATA[fromUser]]></FromUserName> <CreateTime>1348831860</CreateTime> <MsgType><![CDATA[text]]></MsgType> <Content><![CDATA[this is a test]]></Content> <MsgId>1234567890123456</MsgId> <MsgDataId>xxxx</MsgDataId> <Idx>xxxx</Idx> </xml> 本地代码:python:3.7 def ReplyText(toUser,fromUser,nowtime,MsgType,content): print(content) XmlForm = f""" <xml> <ToUserName><![CDATA[{toUser}]]></ToUserName> <FromUserName><![CDATA[{fromUser}]]></FromUserName> <CreateTime>{nowtime}</CreateTime> <MsgType><![CDATA[text]]></MsgType> <Content><![CDATA[{content}]]></Content> </xml> """ return { "isBase64Encoded": False, "statusCode": 200, "headers": {"Content-Type": "application/json", "charset": "UTF-8"}, "body": XmlForm }
2022-08-18 - 导入公众号接口一直显示token错误,可是签名核对OK了?
日志详情: START RequestId: 1c4fbf7922aa04dc387ee3b9a0d05025GET {'memory_limit_in_mb': 128, 'time_limit_in_ms': 3000, 'request_id': '1c4fbf7922aa04dc387ee3b9a0d05025', 'environment': '{"SCF_NAMESPACE":"default"}', 'environ': 'SCF_NAMESPACE=default;SCF_NAMESPACE=default', 'function_version': '$LATEST', 'function_name': 'Official', 'namespace': 'default', 'tencentcloud_region': 'ap-guangzhou', 'tencentcloud_appid': '1313362700', 'tencentcloud_uin': '100016828706'} {'echostr': '1158372434282114047', 'nonce': '2087797217', 'signature': 'd6e68470abb76028dc00504db1ef5793b52cad39', 'timestamp': '1660707181'} handle/GET func: hashcode:d6e68470abb76028dc00504db1ef5793b52cad39 signature:d6e68470abb76028dc00504db1ef5793b52cad39 Response RequestId: 1c4fbf7922aa04dc387ee3b9a0d05025 RetMsg: "1158372434282114047"END RequestId: 1c4fbf7922aa04dc387ee3b9a0d05025Report RequestId: 1c4fbf7922aa04dc387ee3b9a0d05025 Duration: 2ms Memory: 128MB MemUsage: 9.14MB
2022-08-17