Netbeans IDE default UTF-8 encoding, netbeansutf-8

Source: Internet
Author: User

[Convert] Netbeans IDE default UTF-8 encoding, netbeansutf-8

NetBeans is an excellent open-source integrated development environment that can be used for development in Java, C/C ++, PHP, and other languages. It is also a scalable development platform that can use plug-ins to Expand functions not available in official versions.

NetBeans is very mentally retarded. When opening a file, it cannot automatically identify the file encoding. What's more retarded is that it cannot directly change the encoding when an Encoding Error occurs. For example, by default, opening a UTF-8-encoded file causes garbled characters.

After finding the option for a long time, I didn't find the place to set the file encoding. Du Niang told me that I needed to modify the NetBeans startup parameter.

If you want NetBeans to decode the file with a UTF-8, You need to modify the configuration file as follows:

1. find the etc folder under your Netbeans installation directory, such as C: \ Program Files \ NetBeans 8.1 \ etc \ 2. open netbeans in notepad. conf3. find the netbeans_default_options clause and make sure there is no sign # in front of it. Add a space before the double quotation marks at the end of the line and add the following parameter.
J-Dfile.encoding = UTF-8

Restart NetBeans to make the configuration take effect. Then open the UTF-8 file will not be garbled.

The modification location is as follows:

In addition, pay attention to whether the encoding set for each project property is a UTF-8, right-click the project, choose Properties menu, select the source project, see the following setting interface:

 

Refer:

Http://blog.sina.com.cn/s/blog_664c9f650101e4ph.html

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.