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.
[Nb Build 200406061800, jdk1.5.0-b3] JSPs with followin directive are saved as ISO-8859-2 <%@page contentType="text/html; charset=UTF-16"%> Without the space after ";" it works fine. JSP 2.0 specification says that the space is optional.
TYPO: not ISO-8859-2 but ISO-8859-1
Pardon me, I wrong elvaluated my observations. The problem doesn't depend on the space after ";" but the Editor plays even/odd. odd saving => UTF-8 even saving => ISO-8859-2
It looks like this problem is fixed with the putting the xerces on the jsp parser classpath.
Still reproducible: 1) create a .jsp with following page directive: <%@page contentType="text/html; charset=UTF-16"%> 2) type some Czech chars and save the document NOTE: document is saved correctly 3) type more Czech chars and save it again ERROR: Warning dialog: 'The document contains characters which will be damaged during the conversion into ISO-8859-1 char set.' appears 4) cancel the dialog and save it again NOTE: document is saved correctly
Obsolete milestone, please reevaluate
Issue is still reproducible. When the file is closed after the encoding was changed and than reopened again everything works correct. Reproducibility seems to be dependent on some internal state.
Seems to be a threading issue for file encoding.
The root cause is the file stored in plain UTF-16 (for specific conditions) - without byte order mark. After that jasper is not able to determine the charset and returns ISO-8859-1. Another, almost same issue: issue 44416.
The real cause of the problem follows: File is stored with charset UTF-16 and encoder adds BOM (saving it as UTF-16BE). It's correct. When the content in the editor is changed and saved again ide uses the UTF-16BE encoder for the _editor content_ and this encoder does not save any BOM (and no BOM _in editor_ exists). The result is the incorrect file on the disk (UTF-16 without BOM).
The root of the problem is now known.
Same problem exists now with UTF-8 in VW 4.1.1 (at least in the woodstock nbm component)! When you open a VW-JSF in an UTF-8 project, the XML encoding is set to ISO-8859-1, the contentType to charset=UTF-8 and pageEncoding=ISO-8859-1. When you correct it, it will be switched when the project is started with "Run". Result: backing beans strings with umlauts on JSF pages and submitted textfields with umlauts are mangled in Firefox! This is absoluteley unacceptable - therefore I raise the priority to P1; it makes Netbeans unusuable for creating web content for languages like German. You need to fix this! Product Version: NetBeans IDE 6.0 (Build 200711261600) Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06 System: Windows XP version 5.1 running on x86; Cp1252; de_DE (nb)
There was an error in my statement - backing beans strings with umlauts are not affected as such. The problem arises when you submit field contents with german umlauts - they get mangled when you redisply them.
> When you open a VW-JSF in an UTF-8 project, the XML encoding is set to ISO-8859-1, the contentType to charset=UTF-8 and > pageEncoding=ISO-8859-1. I am sorry, I am not aware of all the aspects of the VW so I may miss something, but are you talking about creating of a of the file, aren't you? Can you attach the file please? > When you correct it, it will be switched when the project is started with "Run". Can you also attach the file after the correction? The problem you described here is imho unrelated to what was reported before, but I'll wait with the resolution for your replay. Thanks in advance.
Please answer the questions, I am downgrading the issue to P2 since the justification for P1 is not clear.
The issue explored by Petr H. needs to be fixed.
Petre, since you did the deep investigation and found the problem, can you also fix it please? Thanks.
Fixed in changeset 81ae90caf0df.
Product Version: NetBeans IDE Dev (Build 200807101204) Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11 System: Linux version 2.6.24-19-generic running on i386; UTF-8; en_US (nb) Userdir: /home/josin/.netbeans/dev
Issue ok and verified. Product Version: NetBeans IDE Dev (Build 200807101204) Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11 System: Linux version 2.6.24-19-generic running on i386; UTF-8; en_US (nb) Userdir: /home/josin/.netbeans/dev