当前位置:网站首页>YYGH-BUG-02
YYGH-BUG-02
2022-06-28 05:41:00 【小赵呢】
今天在做预约挂号系统微信登录通过accessToken,openid获取登录信息的时候发现nickname这个是一种乱码
这里我们通过,编辑器查看一下这个昵称到底是什么格式的编码
UTF-8显然不是

GBK显然也不是
看来正向不好推出,已知我们的昵称是沉迷学习!!!所以我们产看一下沉迷学习的各种编码格式


最终通过对比发现微信昵称通过Http传输其编码格式为windows1252
@Test
public void coding() throws UnsupportedEncodingException {
String s = new String("و²‰è؟·ه\u00AD¦ن¹ !!!".getBytes("windows-1256"),"UTF-8");
log.info(s);
}

完成
//用于昵称是windows1252格式转换为utf-8
nickname = new String(nickname.getBytes("windows-1256"),"UTF-8");
log.info("nickname为" + nickname);
在原代码中更改
之后进行测试发现还是乱码,这里我们去看一下官方文档看看他到底是什么样的编码格式
官方也没有给出到底是什么格式
边栏推荐
- Binder面试之:内存管理单元
- Interpretation of cloud native microservice technology trend
- ipvs 导致syn 重传问题
- 容量调度绝对值配置队列使用与避坑
- [MySQL] all query tables contain 20million data -- how to optimize SQL
- Oracle 常用基础函数
- Gee learning notes 3- export table data
- RL practice (0) - and the platform xinchou winter season [rule based policy]
- 【C语言练习——打印空心正方形及其变形】
- 从0配置redis
猜你喜欢

Oracle 常用基础函数

数据中台:六问数据中台

Application of Beidou No.3 short message terminal in dam safety monitoring scheme
![A full set of excellent SEO tutorials worth 300 yuan [159 lessons]](/img/d7/7e522143b1e6b3acf14a0894f50d26.jpg)
A full set of excellent SEO tutorials worth 300 yuan [159 lessons]

Yunda's cloud based business in Taiwan construction 𞓜 practical school

Jenkins持续集成1

Oracle基础知识总结

6. graduation design temperature and humidity monitoring system (esp8266 + DHT11 +oled real-time upload temperature and humidity data to the public network server and display the real-time temperature

Solution of dam safety automatic monitoring system for medium and small reservoirs

jq图片放大器
随机推荐
V4l2 driver layer analysis
开发者的时代红利在哪里?
函数栈帧的创建和销毁
Capacity scheduling absolute value configuration queue usage and pit avoidance
How to develop the language pack in the one-to-one video chat source code
Syn retransmission caused by IPVS
TypeScript接口
Maskrcnn, fast RCNN, fast RCNN excellent video
Create NFS based storageclass on kubernetes
5g network overall architecture
pkg打包node工程(express)
线条动画
V4L2 驱动层分析
RL 实践(0)—— 及第平台辛丑年冬赛季【Rule-based policy】
[MySQL] all query tables contain 20million data -- how to optimize SQL
Mysql-17- create and manage tables
Sharing | intelligent environmental protection - ecological civilization informatization solution (PDF attached)
MySQL 45 talk | 05 explain the index in simple terms (Part 2)
Prime mover × Cloud primordial is making sound, reducing cost and increasing efficiency lecture hall
Bidirectional level conversion circuit