Bug 206559 - I18N: changing HTML charset encoding does not work until restart of NetBeans
I18N: changing HTML charset encoding does not work until restart of NetBeans
Status: NEW
Product: web
Classification: Unclassified
Component: HTML Editor
7.1
All All
: P3 (vote)
: 7.4
Assigned To: issues@web
issues@javaee
: I18N
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-20 00:42 UTC by Masaki Katakai
Modified: 2014-01-17 09:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
NetBeans shows warning euc-jp is not correct just after changing source code (102.93 KB, image/png)
2011-12-20 00:44 UTC, Masaki Katakai
Details
after restarting NetBeans, the warning disappeared and property dialog also says it's EUC-JP (97.76 KB, image/png)
2011-12-20 00:44 UTC, Masaki Katakai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Masaki Katakai 2011-12-20 00:42:36 UTC
I tried this on both 7.1 and 7.0.1 and got the same results. It seems that
changing charset encoding does not work until NetBeans is restarted.

1. Start NetBeans
2. Create a project by default
    It means project encoding is set to "UTF-8" by default

3. Create a HTML file from File>New File... and Other>HTML File
    The project encoding is set to UTF-8, so created file also should be UTF-8 encoding. -> OK

<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <div>TODO write content</div>
    </body>
</html>

4. Modify "UTF-8" to "Shift_JIS" or other encoding like

        <meta http-equiv="Content-Type" content="text/html; charset=EUC-JP">

        <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">

    Yellow line is displayed on the line and it complains

     Warning	Internal encoding declaration "euc-jp" disagrees with the actual encoding of the document ("utf-8"). From line 9, column 9; to line 9, column 76 (Rule Category: All Other)	newhtml.html	/home/mkatakai/NetBeansProjects/WebApplication7/web/newhtml.html:9

5. Open propery of the file, it still says "UTF-8" (screenshot)
6. close the file and open it again, the warning is still displayed, project dialog of the file is still saying it's UTF-8
7. close the project and open it again, however, the warning is still displayed, project dialog of the file is still saying it's UTF-8
8. quit NetBeans and start it again, finally the warning disapper and project dialog says it's EUC-JP (screenshot)
Comment 1 Masaki Katakai 2011-12-20 00:44:25 UTC
Created attachment 114331 [details]
NetBeans shows warning euc-jp is not correct just after changing source code
Comment 2 Masaki Katakai 2011-12-20 00:44:56 UTC
Created attachment 114332 [details]
after restarting NetBeans, the warning disappeared and property dialog also says it's EUC-JP
Comment 3 Marek Fukala 2012-04-23 12:54:03 UTC
reproducible


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo