Download/export problem (uniform return): No converter for xxx with preset Content-Type application/octet-stream; charset=UTF-8

1. Preface The download interface returns download data normally. After the file stream is closed, the response returns success and the console reports an error all content: Probably means there is no converter. Contains the default content type “application/octet-stream;charset=UTF-8” org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class com.cn.common.AjaxResult] with preset Content-Type ‘application/octet-stream;charset=UTF-8’ at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:319) at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestResponseBodyMethodProcessor.java:194) at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:78) […]

scp tab completion error: F-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8)

1. Problem description During a certain Linux operation, the function scp command was used, and the following directory could not be completed using Tab. The error was reported: -bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory Related links: character map file `UTF-8’ not found 2. Cause handling 1) As shown […]

[Unity Expansion Tool] Change the encoding format of script files in batches (the encoding format of script files in Unity is garbled when converted from ANSI to UTF8)

Tip: Record some simple results in the learning process for easy review in the future. I hope it will be a little helpful to readers. Article directory Preface 1. Implementation ideas 2. Basic knowledge 1. Encoding format 2. Notes on Unity script transcoding 3. Specific code implementation Reference link Summarize Foreword In some game projects, […]

A pot of coding knowledge (ASCII, ISO-8859-1 (Latin1), GB2312, GBK, GB18030, BIG5, UTF-8, UTF-16, UTF-32, Bom, garbled code)

Coding knowledge stewed in a pot Coding history Era Encoding Length Description Problem Machine Code Era 01 Binary 8bit Generally, 1 represents high level and 0 represents low level People cannot understand it The Age of Enlightenment ASCII Single Byte American Standard Information Interchange Code, the most common today A single-byte encoding system, the first […]

CentOS 8 reports an error when executing the yum command: Failed to set locale, defaulting to C.UTF-8

Today, Docker created a new CentOS image. When running a container based on this image and executing the yum command, I encountered the following error: [root@GC Administrator]# yum install -y yum-utils Failed to set locale, defaulting to C.UTF-8 CentOS Linux 8 – AppStream 41 B/s | 38 B 00:00 Error: Failed to download metadata for […]

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 […]

Analysis of SurfaceFlinge/InputFlinger – analysis of the normal principle after the android screen is zoomed

hi, fans and friends: In the past two days, I happened to be doing domestic demand related to free windows, and I just encountered a doubt, that is, after zooming the screen, I found that touching the screen can still reflect the problem normally. Specific doubt background The doubts are as follows: The coordinates are […]