Current location - Quotes Website - Signature design - What if Qt has a constant and a newline?
What if Qt has a constant and a newline?
It will not appear when gcc/mingw or clang is used as a compiler, but it will appear if you compile with MSVC in another environment.

Specifically:

C48 19: This file contains characters (936) that cannot be represented in the current code page. Please save this file in Unicode format to prevent data loss.

C200 1: There are line breaks in the constant.

The problem is the Chinese characters in the source code.

If you select encoding in QT Creator, ...

Frequent errors: Error: Unable to decode "XXX". CPP ",with" XXX "-code. Cannot edit.

And the Chinese in the source code will become garbled.

Solution:

Open the error source code with Visual Studio.

File-> Advanced save options-> Coding,

Change the encoding from "Uncoded (UTF-8 unsigned)-codepage 6500 1" to.

become

"Uncoded (UTF-8)- 8 with signature)-code page 6500 1"

Save after confirmation.

In QT Creator, Chinese can be displayed correctly, and there will be no "constant line break" error.