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.
How to reproduce: 1) Create JSP file 2) Type following line: <%@page contentType="text/html; charset=ISO-8859-2;"%> 3) Save file using Ctrl+S 4) ERROR - java.nio.charset.IllegalCharsetNameException is shown in exception dialog - see attachment
Created attachment 12552 [details] Exception
Already fixed in the trunk.
I'm using NetBeans 3.6 qbuild version 200402251620 same steps. interesting thing is that the file is saved without an exception dialog on the second try. attatching ide.log for more investigation
Created attachment 13739 [details] ide.log
I didn't catch the ';' in the "charset=ISO-8859-2;". The parser returns encoding "ISO-8859-2;". I'm going to fix it.
*** Issue 40632 has been marked as a duplicate of this issue. ***
The fix is in the trunk. There is catch for the exception and if this exception occurs, the information dialog is shown.
Fix: http://web.netbeans.org/source/browse/web/core/src/org/netbeans/modules/web/core/jsploader/BaseJspEditorSupport.java.diff?r1=1.25&r2=1.26
The dialog is shown as an ordinary exception within the ide. I think there must be some informative message about it. And also could you verify that http://www.netbeans.org/issues/show_bug.cgi?id=40632 is fixed also?
The fix brings the dialog, which informs user about bad encoding and asks him, whether he wants to save it in UTF-8. You can see it in todays builds. The issue 40632, is consequence of this bug. It should not occur now. So I'm not going to fix it, because it is not valid.
Still reproducible: 1) perform steps 1 - 4 from original 'How to reproduce'. ERROR: The editor didn't trim trailing ';' and displays warning: 'The "ISO-8859-2;" character set that is used in index.jsp is not valid character set .... Did you want to save the file using the UTF-8 character set?' 2) press 'Yes' button ERROR: java.nio.charset.IllegalCharsetNameException is shown in exception dialog. NOTE: Question dialog 'File index.jsp was modified externally. Reload it?' appears at the same time. 3) press 'Yes' button ERROR: All document text is deleted and Undo button is disabled. Reproducible data lost -> P1.
I agree with you Martin, this is P1. I committed the fix in the main trunk. See http://web.netbeans.org/source/browse/web/core/src/org/netbeans/modules/web/core/jsploader/BaseJspEditorSupport.java.diff?r1=1.27&r2=1.28
Reviewed by QE. The fix is fine.
Reviewed. Looks fine.
Committed in to release36 branch as well.
*** Issue 40731 has been marked as a duplicate of this issue. ***
V