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.
Summary: | Cannot load form after setting a JPasswordField echoChar to character zero (\u0000) | ||
---|---|---|---|
Product: | guibuilder | Reporter: | didgeridoo <didgeridoo> |
Component: | Code | Assignee: | issues@guibuilder <issues> |
Status: | NEW --- | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
didgeridoo
2008-08-29 10:32:52 UTC
Reassigning to form. This error occurs in Netbeans 6.5 Beta (GUI Builder 1.2) and Netbeans 6.1 (GUI Builder 1.1.1) Reproducible Designer correctly saved char '\u0000' into XML form file. This value is stored using unicode character entity with code in hexadecimal form. Designer throws following exception while we are trying to parse xml form file using org.openide.xml.XMLUtil.parse() ... org.xml.sax.SAXParseException: Character reference "�" is an invalid XML character. at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:239) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283) at org.openide.xml.XMLUtil.parse(XMLUtil.java:337) at org.netbeans.modules.form.GandalfPersistenceManager.canLoadForm(GandalfPersistenceManager.java:259) at org.netbeans.modules.form.FormEditor.recognizeForm(FormEditor.java:446) All "control" codes x00-1f failed, x20-... works. ...There are certain characters that are forbidden from being in XML as per the official specification (http://www.w3.org/TR/REC-xml/#charsets). These characters are the low ascii characters such as NULL, EOF etc. Its important to note that this is not a case of unescaped/unencoded versions of this character being disallowed, the encoded characters are also disallowed. ... (http://blog.cwa.me.uk/2007/10/01/invalid-xml-from-a-net-web-service/) We should use CDDATA element or external own entity definition to save these chars into xml. |