- 当前 Bug 的表现(可附上截图)
{"nickName":" 阿炳perro","gender":1,"language":"zh_CN","city":"Minhang","province":"Shanghai","country":"China","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/YoicmcnycrJxnNrgZoKlfuY3KiaIS2VeibmLLAaOwUrIxDticoiatmNRc4bZQf1cTiafCjS3viba1WNNNGIN4tXCgjxiag/132"}&rawData={"nickName":" 阿炳perro","gender":1,"language":"zh_CN","city":"Minhang","province":"Shanghai","country":"China","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/YoicmcnycrJxnNrgZoKlfuY3KiaIS2VeibmLLAaOwUrIxDticoiatmNRc4bZQf1cTiafCjS3viba1WNNNGIN4tXCgjxiag/132"}
- 预期表现
{"nickName":"👻阿炳perro🐬","gender":1,"language":"zh_CN","city":"Minhang","province":"Shanghai","country":"China","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/YoicmcnycrJxnNrgZoKlfuY3KiaIS2VeibmLLAaOwUrIxDticoiatmNRc4bZQf1cTiafCjS3viba1WNNNGIN4tXCgjxiag/132"}&rawData={"nickName":" 阿炳perro","gender":1,"language":"zh_CN","city":"Minhang","province":"Shanghai","country":"China","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/YoicmcnycrJxnNrgZoKlfuY3KiaIS2VeibmLLAaOwUrIxDticoiatmNRc4bZQf1cTiafCjS3viba1WNNNGIN4tXCgjxiag/132"}
- 复现路径
获取有emoji图标的用户昵称,部分会有问题
- 提供一个最简复现 Demo
哥,,这问题你解决了没,,,我现在也遇到了,,,api返回的就是乱码
这是微信返回的,这并不是我存到数据库的。而且我签名都能通过,如果微信返回的是正常头像,而我拿到了不正常,签名都过不了。
数据库及字段编码改为 utf8mb4
这是存到数据库之前的情况
能正常解密,存入数据库不乱码,就没问题,控制台输出不了emoji和你的操作系统或编辑器编码有关系
但是这个用户是有emoji图标的,我的意思是微信接口返回的有问题。
我也怀疑是微信返回有问题,如果我数据库不是utf8mb4,是会报错的,现在可以存进去说明编码是没有问题的
数据库字段的编码修改下就行了
这是存到数据库之前的情况
???啊!我的眼睛