Mybatis error reporting problem: Byte 1 of the 1-byte UTF-8 sequence is invalid,?java.lang.IllegalStateException: Failed to load ApplicationCon

Here my problem occurs in BookMapper.xml ? java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:125) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:107) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117) at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:242) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190) at […]

Comments Enlarge to utf-8 No signature

#ifndef MYGRAPHICSVIEW_H #define MYGRAPHICSVIEW_H #include <QGraphicsView> #include <QGraphicsScene> #include <vector> class MyGraphicsView : public QGraphicsView {<!– –> Q_OBJECT public: explicit MyGraphicsView(QWidget *parent = nullptr); public: qreal GetScaledValue() const //Get the latest magnification {<!– –> return m_qrScaledNum; } void SetScaledValue(qreal qrScaledNum) {<!– –> this->m_qrScaledNum = qrScaledNum; } void SetScaledDefaultValue() {<!– –> this->m_qrScaledNum = 1; } protected: […]

MySQL pitfall: Never use UTF-8 in MySQL! !

Error review Write the emoji text directly into SQL, and execute the insert statement to report an error; INSERT INTO `csjdemo`.`student` (`ID`, `NAME`, `SEX`, `AGE`, `CLASS`, `GRADE`, `HOBBY`) VALUES (’20’, ‘Chen Haha’, ‘Male’, ’20’, ‘Class 181’, ‘Grade 9’, ‘Watching movies’); [Err] 1366 – Incorrect string value: ‘\xF0\x9F\x98\x93’ for column ‘NAME’ at row 1 After changing […]

MySQL pitfall: Never use UTF-8 in MySQL! !

Click on the “Java base” above, select “Set as star” Be a positive person, not a positive waste person! Update articles every day at 14:00, lose a million bits of hair every day… Source code boutique column Original | Java 2021 Super God Road, very liver~ An open source project with detailed annotations in Chinese […]

Encoding (ASCII code, urlcode, html entity encoding, unicode, utf-8, html status code)

ASCII code ASCII (American Standard Code for Information Interchange): American Standard Code for Information Interchange is a computer coding system based on the Latin alphabet, mainly used to display modern English and other Western European languages. It is the most common information exchange standard and is equivalent to the international standard ISO/IEC 646. ASCII codes […]

unicode conversion UTF-8, UTF-16, UTF-32 encoding rules (including codes)

utf8, utf16, utf32 encoding rules Tool recommendation: hexadecimal conversion unicode encoding viewer ascii encoding viewer UTF encoding conversion What is utf8 Reference link: Wikipedia Ruan Yifeng UTF-8 (8-bit Unicode Transformation Format) is a variable-length character encoding for Unicode and a prefix code. It can use one to four bytes to encode all valid code points […]

Use stdio.h stdlib.h to realize utf-8 to utf-16, use malloc to apply for memory in the function, and check the validity at the same time, output error

The following is a simple example of converting utf-8 to utf-16 using stdio.h and stdlib.h, while taking into account some error conditions: #include <stdio.h> #include <stdlib.h> #include <stdint.h> #define UNICODE_ERR -1 #define MALLOC_ERR -2 int utf8_to_utf16(uint8_t *utf8, uint16_t **utf16) { int len = 0; // The required length of the utf16 array int len_utf8 = […]

Encoding issues (Unicode utf-8 love/hate

Directory 1. Strange encoding encountered? Edit 2. What is Unicode, why should it be used, and under what circumstances should it be used 3. The method of translating Unicode 4. Convert Unicode characters to UTF-8 encoding 5. Convert Unicode characters to Chinese text 6. “All types” become Unicode encoding 7.selected_categories={“Type”:”Comedy”} 1. Encountered a strange code […]

How to use QFile in QT to identify the encoding format of txt files: utf-8 ANSI

Series article directory Article directory Series Article Directory foreword 1. Determine the encoding format of the txt file Two, the solution Specific use 3. Reference Foreword Brother, I read the txt file in ansi encoding format in the QFile class in the previous Qt, and displayed garbled characters in the QTextEdit control The article talks […]

Invalid UTF-8 data was contained while parsing a protocol buffer. If you intend to send raw bytes, use the “bytes” type question

Article directory 1. Invalid UTF-8 data is included when parsing the protocol buffer. If you intend to send raw bytes, use the “bytes” type question 2. The difference between bytes and string in protobuf in C++ 1. Invalid UTF-8 data is included when parsing the protocol buffer. If you intend to send raw bytes, use […]