Excuse me, are you familiar with NetBeans master, I open the file with NetBeans, it will occasionally put the Utf-8 file when the GB file open, what is going on?

Source: Internet
Author: User
Tags netbeans
NetBeans Utf-8

Encounter such a problem:
A CSS file that can be determined to be saved in the Utf-8 format.
On the one hand, this file was originally created from NetBeans and is now simply saved to the project as a separate file open.

On the other hand, it has been verified with other editors.

When you open this file with NetBeans, the preview is displayed correctly:

However, when you select Open, you are prompted with this error:

If, at this error prompt, still select "Yes" to open the file, the file is garbled:


Why is it?


Reply to discussion (solution)

Obviously you don't have the default character set for NetBeans

Obviously you don't have the default character set for NetBeans

Excuse me, where is the default character set? Simple to find a bit, wood found. I always thought that I could only set the character sets when I created the project.

In addition, even if the wood has a default character set, in fact, there is a problem, that is, NetBeans to a utf-8 file as a GB2312 file.
In other words, NetBeans does not automatically recognize the file encoding format, only opens the file according to the set mode (assuming the current default character set is set to GB2312).

  • 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.