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.
Form editor inserts escaped unicode characters even when the project can handle these characters.
Could you please remind me what was exactly the problem here? Generated string property values?
The problem was that the form escapes the Chinese characters even when it's not needed, the files is in Chinese encoding. I don't know how much it's important, the code is generated, but it may be a problem for generated fields which may be used by developer. For example private "JButton \u323\u3434\u3434;".
Only the string literals were escaped to unicode, I've removed that. /cvs/form/src/org/netbeans/modules/form/editors/StringArrayEditor.java new revision: 1.7; previous revision: 1.6 /cvs/form/src/org/netbeans/modules/form/editors/StringEditor.java new revision: 1.3; previous revision: 1.2
Fixed.
am verifying - let me know if this is ok ? in the java code, the name of the button, its variable name, its label, all have multibyte and all the mbyte in the java code shows as mbyte, not as escapped chars. ken.frank@sun.com
The characters in java files are ok now, but in .form files, the characters are still escaped, for example <Property name="text" type="java.lang.String" value="文件列表"/> The .form files are all UTF-8 encoded xml files, why should multibyte characters been escaped? Sometimes I simply want to change the text of a label using a text editor, there are no need to launch NetBeans. Now, search and replace multibyte characters in java files are easy, but it is difficult in .form files.
I'm not sure exactly why .form is marked as UTF-8, but in fact it has always been in ascii. We could use UTF-8 for multibyte chars, but does not seem that important: 1) Form file is not intended to be edited directly by users, it is an internal file you should never see in NetBeans. Readability is not a hard requirement (it is correctness and reliability). 2) Search/replace currently does not work for form files in the IDE anyway: issue 111202. 3) For the case you describe it is better to internationalize the text - then change them in properties files. Automatic internationalization is now very easy to use for GUI forms. If you think this is still important for you, please file a separate enhancement request. This issue report is about something else (multibyte chars used for identifiers in java code). Changing back to fixed.
Þ
gtlang, since issue 111202 exists for the search/replace, is this issue itself resolved ok for you ? also, please comment in 111202 about that situation. ken.frank@sun.com