当前位置:网站首页>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
边栏推荐
- Sorting out the core ideas of the pyramid principle
- Distributed ID
- Software testing assignment - the next day
- [vscode - vehicle plug-in reports an error] cannot find module 'xxx' or its corresponding type declarations Vetur(2307)
- HMS core helps baby bus show high-quality children's digital content to global developers
- Unit test notes
- 利用C#实现Pdf转图片
- Pytest -- write and manage test cases
- Shim and Polyfill in [concept collection]
- dataworks自定義函數開發環境搭建
猜你喜欢
JMeter test result output
[classes and objects] explain classes and objects in simple terms
In depth analysis of reentrantlock fair lock and unfair lock source code implementation
Software testing learning - day 3
My 2020 summary "don't love the past, indulge in moving forward"
Summary of remote connection of MySQL
Setting up the development environment of dataworks custom function
Dbnet: real time scene text detection with differentiable binarization
Arctic code vault contributor
[Fiddler problem] solve the problem about Fiddler's packet capturing. After the mobile network is configured with an agent, it cannot access the Internet
随机推荐
Operation principle of lua on C: Foundation
Sorting out the core ideas of the pyramid principle
UTC time, GMT time, CST time
Unit test notes
dataworks自定義函數開發環境搭建
Advanced API (use of file class)
【code】偶尔取值、判空、查表、验证等
How can I split a string at the first occurrence of “-” (minus sign) into two $vars with PHP?
CentOS php7.3 installing redis extensions
MySQL mistakenly deleted the root account and failed to log in
RestHighLevelClient获取某个索引的mapping
EasyExcel
DNS forward query:
2022 - 06 - 23 vgmp - OSPF - Inter - Domain Security Policy - nat Policy (Update)
2022-06-23 vgmp OSPF inter domain security policy NAT policy (under update)
2022-06-23 VGMP-OSPF-域間安全策略-NAT策略(更新中)
The education of a value investor
How does the insurance company check hypertension?
On the practice of performance optimization and stability guarantee
10000小时定律不会让你成为编程大师,但至少是个好的起点