When doing company projects, because of personal preferences, there may be coding conflicts, so most teams are unified with UTF8 encoding. I am a heterogeneous, even if the company is UTF8, I also prefer to GBK (lazy change is the biggest reason).
So once I want to write my own code, it's always out of line with the project.
The previous solution is to open the original code directly, and then copy the source code without garbled, and then paste. It doesn't matter if it's just one or two classes, but if it's a dozens of-class one ...
Now I find another simpler way to get GBK's code to coexist with UTF8!
The steps are as follows:
0, such as a project is UTF8 code
1. Right-click Project New->source folder (e.g. named src_2)
2. Throw the GBK code all in.
3, right-click src_2, modify the encoding format is GBK
4, OK, you can see the code of the project, with src_2 code, are not garbled ~
--------------
In fact, it is built another SRC, set up a different encoding format, but it has solved my many years of heart disease AH ~ ~ (Remember when the transplant code when the history of the copy of the dozens of classes ... )
How eclipse puts two coded codes in a project, such as UTF8+GBK coexistence