This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
*** Please talk with Marek and Petr Pisl first about this; this is based on some mails with them but I may not be clear on what solution was to be. now there is new project and file encoding values the jsp files are seeded with utf-8, the html files are seeded with encoding of users locale in the meta charset tag - when these files are created. new projects are seeded with current value of global encoding or use utf-8 by default. for the html files, it seems from discussion that using system locale for the meta charset tag might not be correct. (information from Tomas is that the encoding of the html or jsp or xml file is the one used in the editor and other non runtime operations of these files - regardless of the value of project encoding value. thus the choice of which encoding to seed the files with might want to consider that aspect. ** if this is a valid issue, let me know if similar should be filed on web/jsp.
Tomas commented in other mail that the html file should get its encoding from project encoding and that its better also if the meta charset tag is set with this value. ken.frank@sun.com
also, it was noted that the other parts of the project that interact with the html file (non runtime) need to view its encoding as that of its project encoding (which now will be the same as it meta charset encoding tag) ken.frank@sun.com
Marek, so what is the conclusion?
Oops, it wasn't assigned to me :-(. The resolution is similar as in the issue for JSPs - #107910. I'll fix the file from templates creation so it creates the files with the proper FEQ encoding + I'll try to fix the HTML template so it contains proper <meta> attribute specifying the page encoding. OTOH, I do not conside these issues as critical, so I work on other P2s primarily.
dont know if this comment will still be valid after this and 97873 are fixed - if so, and it needs separate issue, let me know currently html file has prop of encoding; xml and jsp dont have it. if change the enc prop, the charset tag in the file is not changed if change the charset tag in the html file, the enc prop is changed to that. --- shouldn;t behavior be the same ? --- until the behavior is the same, what will the real value of encoding used for both compile/edit/debug/desigintime and runtime -- the value in the file charset, or the value of the property - since they might be different ? ken.frank@sun.com
The solution depends on issue #110910, I have prepared patch for html editor which I'll commit after the issue is resolved.
fixed Checking in templates/xhtml.xhtml; /cvs/html/src/org/netbeans/modules/html/templates/xhtml.xhtml,v <-- xhtml.xhtml new revision: 1.3; previous revision: 1.2 done Checking in templates/html.html; /cvs/html/src/org/netbeans/modules/html/templates/html.html,v <-- html.html new revision: 1.4; previous revision: 1.3 done Checking in mf-layer.xml; /cvs/html/src/org/netbeans/modules/html/mf-layer.xml,v <-- mf-layer.xml new revision: 1.19; previous revision: 1.18 done Checking in HtmlDataObject.java; /cvs/html/src/org/netbeans/modules/html/HtmlDataObject.java,v <-- HtmlDataObject.java new revision: 1.29; previous revision: 1.28 done Checking in layer.xml; /cvs/web/core/src/org/netbeans/modules/web/core/resources/layer.xml,v <-- layer.xml new revision: 1.103; previous revision: 1.102 done
the web html template still has some hardcode line of meta charset tag, besides the one that uses ${encoding) <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=x-euc-jp"> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=${encoding}"> even though the final one would override the first one, it can be clearer if the first one is not there the html file created from new file->other does not have the 2 meta charset tags. PS does a tld or tag file need to use feq ? the tld is seeded with utf-8 - is it viewed as a jsp file ? jsp files now use the project encoding as seed for encoding tag the tag file, if its xml file, I guess would use the xml file template vs its own ? issue about xml using project encoding for seeding the encoding tag is not yet done. ken.frank@sun.com
reopening - this might not be a valid reopen but wanted to ask a. the template for html file is from html.html in the html jar file b. the l10n kit has this file c. but usually the encoding value for the locale user is in will be put into these html files, but since this is a template file, it should not be changed and should not be localized at all. please comment on the reopen and if sep issue for item c. ken.frank@sun.com I tried to change it in template manager by opening in editor but it did not save the changes; also when opening it in editor gives a warning about encoding ${ENCODING} specified in meta tag of Html.html is invalide do you wnat to load the file using UTF-8 encoding ? (project encoding at this time is utf-8) ---> is this a separate issue ? 1
it does seed the html file with the project encoding value and I could edit the template after all, so I think its just removing it from l10n kit, or if it needs to be in it, to give special instructions not to add own charset tag. ken.frank@sun.com
a. the template for html file is from html.html in the html jar file yes b. the l10n kit has this file why? c. but usually the encoding value for the locale user is in will be put into these html files, but since this is a template file, it should not be changed and should not be localized at all. I do not understand this part completely. I also think the template file shouldn't be localized, just remove it from your l10n kit and let use the default one. I tried to change it in template manager by opening in editor but it did not save the changes; file a separate issue with steps to reproduce please also when opening it in editor gives a warning about encoding ${ENCODING} specified in meta tag of Html.html is invalide this is correct since the template itself contains the ${encoding} as a value of the encoding. This value not being resolved is erroneous, therefore there is the warning and the question. ---> is this a separate issue ? maybe, if you consider this as a bug.
Marek, thanks for explaining about it. as to html.html being in l10n kit, I think its because html cvs has l10n.list file that includes it read global ${l10n-module}/src/org/netbeans/modules/html/**/*.html thus exclude stmt could be needed in that file for the html.html and rhtml.rhtml (isn't this pattern covered however by BE global l10n.list in general so that perhaps just the read global and exclude stmt would be needed ? I'm not sure however - dev owns the l10n.lists and accuracy of l10n kits.) ken.frank@sun.com
can verify this, after one question and one comment: 1. xhtml has the xml encoding part using utf-8 - should it also have the encoding be that of the project ? recent fixes to xml files have their encoding tags come from project encoding vs hardcode to utf-8. 2. will file separate issue that the html.html template file not be in kit; no other template file is in the kit has such a kind of file and its not needed to be in the kit. ken.frank@sun.com
verified that new html file is seeded with project encoding property. ken.frank@sun.com
re-verified html files, build 1123