当前位置:网站首页>When MySQL inserts Chinese into the database, there is a diamond question mark garbled code
When MySQL inserts Chinese into the database, there is a diamond question mark garbled code
2022-07-03 07:01:00 【CSDN Q & A】
1、 The phenomenon and background of the problem
Appears when the database is inserted �� The statement
2、 Problem related code , Do not paste screenshots
for (DetectionFlowBinding flowBinding : bindingList) { task = new PcrTask(); BeanUtils.copyProperties(operatorData, task); task.setDetectionItemName(new String(operatorData.getDetectionItemName().getBytes(StandardCharsets.UTF_8))); task.setFlowId(flowBinding.getFlowId()); task.setFlowName(detectionFlow.getFlowName()); task.setFlowNodeId(flowBinding.getNodeId()); task.setFlowNodeName(new String(flowBinding.getNodeName().getBytes(StandardCharsets.UTF_8))); task.setContainsParam(flowBinding.getContainsParam()); task.setSampleId(operatorData.getId());// Sample the primary key of this table id task.setCreateBy(param.getCreateBy()); task.setCreateTime(new Date()); operatorTaskList.add(task); }3、 adopt mybatis plus Automatically generate code and batch insert
4、DetectionItemName FlowName These two fields occasionally appear in Chinese +� The combination of garbled
5、 It is normal to read Chinese in the log before inserting , Look at Alibaba cloud sql Auditing is also normal , Saving to the database is garbled
notes :mysql8.0 edition
Take the answer :
Look at you mysql Is the character set of the database utf8
边栏推荐
- C2338 Cannot format an argument. To make type T formattable provide a formatter<T> specialization:
- Upgrade CentOS php7.2.24 to php7.3
- MySQL transaction rollback, error points record
- Pytest -- write and manage test cases
- Journal quotidien des questions (11)
- mongodb
- Climb movie paradise 2021 hot
- 如何迁移或复制VMware虚拟机系统
- [set theory] partition (partition | partition example | partition and equivalence relationship)
- Distributed transactions
猜你喜欢

Reading notes of "learn to ask questions"

Pits encountered in the use of El checkbox group

Summary of the design and implementation of the weapon system similar to the paladin of vitality

Machine learning | simple but feature standardization methods that can improve the effect of the model (comparison and analysis of robustscaler, minmaxscaler, standardscaler)

这两种驱蚊成份对宝宝有害,有宝宝的家庭,选购驱蚊产品要注意

Basic components and intermediate components

Ruoyi interface permission verification

每日刷題記錄 (十一)

2022-06-23 vgmp OSPF inter domain security policy NAT policy (under update)

Software testing assignment - day 1
随机推荐
Strategy mode
Realize PDF to picture conversion with C #
[day15] introduce the features, advantages and disadvantages of promise, and how to implement it internally. Implement promise by hand
每日刷題記錄 (十一)
Operation principle of lua on C: Foundation
Reading notes of "learn to ask questions"
2022-06-23 VGMP-OSPF-域间安全策略-NAT策略(更新中)
Laravel Web Framework
Centos切换安装mysql5.7和mysql8.0
2022-06-23 VGMP-OSPF-域間安全策略-NAT策略(更新中)
2022-06-23 vgmp OSPF inter domain security policy NAT policy (under update)
Basic teaching of crawler code
保险公司怎么查高血压?
php artisan
机器学习 | 简单但是能提升模型效果的特征标准化方法(RobustScaler、MinMaxScaler、StandardScaler 比较和解析)
How can the server set up multiple interfaces and install IIS? Tiantian gives you the answer!
Ruoyi interface permission verification
Advanced API (byte stream & buffer stream)
服务器如何设置多界面和装IIS呢?甜甜给你解答!
Journal quotidien des questions (11)