During the development process, I encountered a very strange problem. I don’t know whether it was because I changed the default attribute encoding in the settings or copied other codes. It was also a great experience.
You should pay attention to whether there are problems with several files. This error will only remind one file. After the modification is completed, start the project to see if the error is still reported for that file. .
Solution
First check Settings->Compiler->File Encoding
The Chinese Language Pack plug-in is used here, so the display is in Chinese. First, the BOM is set to not include BOM.
method one
The simplest and crudest method is to find the price of the error report after the BOM is set, first copy the file content, then delete the file, create a new one and paste it. (This method is not recommended if the file is garbled)
Method 2 idea
Enter the error page, click File->File Properties->File Encoding in the upper left corner
Click more and find UTF-8 click
Click Convert. If the garbled code is garbled, you can click Reload (here is a demonstration, so the picture shows UTF-16, so select UTF-8)
That's it. If you still get an error after restarting the project, please check if there are other errors in asking for prices. If you still get an error with this file, please refer to method three.
Method three notpad++
Use this tool to open files for encoding.
For the download address, please refer to ProYuan28’s works.
This is the end of sharing.
Xiaobai has a long road ahead, let’s work hard together! ! ! !