JS default encoding method and MyEclipse modified __ Code

Source: Internet
Author: User
Open a JS file, when the editor completes the Save, suddenly remind the following error:

Save could not is completed.

Reason:

Some characters cannot be mapped using "iso-8859-1″character encoding. Either change the encoding or remove the characters which are not supported by the Iso-8859-1″character encoding.

Obviously, because the JS file contains Chinese characters, but my project properties are set to Utf-8 encoding, and the use of Notepad to open the Save as Utf-8 encoding still can not solve the problem. Later, after consulting the data on the Internet, the original JS file is iso8859-1 encoding, the solution is as follows: Find Preferences in the Window menu, find General-> Content Type on the left side of the open windows, and then in the right window You can see text, point open the front of the small triangle, after find JavaScript, in the bottom of the Default Encoding inside, will iso8859-1 to UTF-8, and then click on the right side of the Update, and then click OK to save.

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.