How eclipse puts two coded codes in a project, such as UTF8+GBK coexistence

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.