当前位置:网站首页>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
边栏推荐
- Tool class static method calls @autowired injected service
- Resthighlevelclient gets the mapping of an index
- Practical plug-ins in idea
- IC_ EDA_ All virtual machine (rich Edition): questasim, vivado, VCs, Verdi, DC, Pt, spyglass, icc2, synthesize, innovative, ic617, mmsim, process library
- The dynamic analysis and calculation of expressions are really delicious for flee
- What are the characteristics and functions of the scientific thinking mode of mechanical view and system view
- Liang Ning: 30 lectures on brain map notes for growth thinking
- 10000小时定律不会让你成为编程大师,但至少是个好的起点
- 这两种驱蚊成份对宝宝有害,有宝宝的家庭,选购驱蚊产品要注意
- Software testing learning - the next day
猜你喜欢

Reading notes of "learn to ask questions"

These two mosquito repellent ingredients are harmful to babies. Families with babies should pay attention to choosing mosquito repellent products

dataworks自定義函數開發環境搭建

dataworks自定义函数开发环境搭建

DBNet:具有可微分二值化的实时场景文本检测

HMS core helps baby bus show high-quality children's digital content to global developers

2022-06-23 VGMP-OSPF-域間安全策略-NAT策略(更新中)

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

卡特兰数(Catalan)的应用场景

Ruoyi interface permission verification
随机推荐
2022-06-23 VGMP-OSPF-域間安全策略-NAT策略(更新中)
Resttemplate configuration use
Thoughts in Starbucks
Basic components and intermediate components
Reading notes of "learn to ask questions"
Software testing assignment - the next day
Mise en place d'un environnement de développement de fonctions personnalisées
These two mosquito repellent ingredients are harmful to babies. Families with babies should pay attention to choosing mosquito repellent products
Golang operation redis: write and read kV data
保险公司怎么查高血压?
Specified interval inversion in the linked list
Flask Foundation
POI excel percentage
What are the characteristics and functions of the scientific thinking mode of mechanical view and system view
[set theory] equivalence classes (concept of equivalence classes | examples of equivalence classes | properties of equivalence classes | quotient sets | examples of quotient sets)*
深度学习参数初始化(一)Xavier初始化 含代码
Operation principle of lua on C: Foundation
How can the server set up multiple interfaces and install IIS? Tiantian gives you the answer!
2022 East China Normal University postgraduate entrance examination machine test questions - detailed solution
Pytest attempts to execute the test case without skipping, but the case shows that it is all skipped