Solve Chinese garbled characters entered by ruby

Source: Internet
Author: User
Tags netbeans

When Ruby is used in netbeans, all Chinese output is garbled. The solution is as follows:

Find the etc directory in the installation directory of netbeans, open the directory, and then open the file in netbeans

Add an option to the netbeans. conf configuration file.

That is to add the-J-Dfile.encoding = UTF-8 parameter at the end of the netbeans_default_options line.

After adding netbeans_default_options = "-J-client-J-Xss2m-J-Xms32m-J-XX: permsize = 32 m-J-XX: maxpermsize = 200 m-J-Dapple.laf.useScreenMenuBar = true-J-Dapple.awt.graphics.UseQuartz = true-J-Dsun.java2d.noddraw = true-J-Dfile.encoding = UTF-8"

After modification, save the configuration file and restart netbeans. It is found that the output of Chinese characters is normal.

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.