Hello! I’m grey Ape! A super bug writing program ape!
Recently in the use of the IDEA of writing a Java project encountered such a situation, is the code before running is no problem, then at the time of the next day to the code to add Chinese annotation, while on a run again program has been unable to run normally, examined the error reason code to add Chinese annotation, an error is like this:
There is no problem when the code is run again after deleting the Chinese comments. After modifying the Chinese comments into English comments, it can also run normally……
My day! Or the first time to meet because of Chinese and English annotations caused a BUG program! However, how could I modify so many Chinese annotations into English since I was born with excellent English proficiency?
Then I searched for relevant solutions on the Internet, but found that they were not what I wanted. Finally, I speculated that the problem should be caused by the coding problem of the operating environment, and then MODIFIED the environment coding of IDEA into UTF-8 to solve the problem.
The solution steps are as follows:
Open IDEA file – > Settings – > Compiler – > file encoding
And then I’m going to set the encoding to UTF-8, which is utF-8, and then I’m going to reset it.
The details are as follows: