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.
OS:RedHat 6.2J, SDK:Sun Java SDK 1.3.1 for Linux, Locale:ja_JP.ujis To reproduce 1)Making resource bundle uzing i18n wizard 2)Add locale to resource bundle 3)Edit the resource bundle from source editor, use open of context menu(editor00.png) 4)View the resource bundle using source editor, use edit of context menu(editor01.png) Details We can edit the resource in souce editor for each locale. Also we can add comments for each locale. The comments should be saved using Unicode escape sequence, but source editor uses native encoded string. Properties for bundle and I18n wizard both use Unicode escape sequence.
Created attachment 2007 [details] Screen shot
Created attachment 2008 [details] screen shot
Yes, the ISO 8859-1 character encoding must be used, using "\u" escaping for other characters. It is responsibility of properties module.
Contacts updated.
Target milestone -> 3.3.1.
We don't have any workaround except not to use this editor. But this editor is really help to create resource bundles. And besides, this problem corrupts the user input characters. Could you make progress?
fixed in [maintrunk] /cvs/properties/src/org/netbeans/modules/properties/PropertiesTableCel lEditor.java,v <-- PropertiesTableCellEditor.java new revision: 1.22; previous revision: 1.21 Please verify the fix in tomorrow (17.01.2002) build or using the attached patch by installing the local.jar into <NBDir>/modules/patches/org-netbeans-modules-properties/ folder If the fix will be correct and verified I will try to integrate it into the release NB 3.3.1. Thank you! Mato
Thank you Meto! It's really quick. I've verified on Build 200201170100. The multibyte comments works fine! This problem has been fixed. However, I have a questions. The saved file is encoded to unicode escape. And the LF (0x000a) in comments is also converted to "\u000a". . It's only in comment. See attached properties file for detail. I think it's better not to convert LF, because the number of lines is different between default resource file and local resource file. What do you think about it? Again, thank you. Keiichi
Created attachment 4237 [details] The English local resource (It's for reference, I tested with ja).
fixed in [maintrunk] /cvs/properties/src/org/netbeans/modules/properties/PropertiesTableCel lEditor.java,v <-- PropertiesTableCellEditor.java new revision: 1.23; previous revision: 1.22 /cvs/properties/src/org/netbeans/modules/properties/UtilConvert.java,v <-- UtilConvert.java new revision: 1.8; previous revision: 1.7 Hello Keiichi, thank you for your testing. I have fix the bug with converting the whitespaces. Please, verify the fix. I am attaching the patch. Mato
Created attachment 4244 [details] convert without WS patch
Keiichi, Please, copy the attached patch local2.jar into <NBDir>/modules/patches/org-netbeans-modules-properties/ folder and restart NB. Thank you, Mato
Hello Meto, I've verified the fixing in Build 200201170100 and your patch (local2.jar). Everything works fine! Thank you. Keiichi
The fix is easy. Comment had to be convert to unicode. It was done using UtilConvert.charsToUnicodes(...) method as shown in the attachement diff1.txt Because UtilConvert.charsToUnicodes(...) converts to unicode also whitespaces, it was needed to make additional fix of the bug. The method UtilConvert.charsToUnicodes(String s) has been overloaded by charsToUnicodes(String theString, boolean escapeWhiteSpaces) where parameter escapeWhiteSpaces allows to specify whether convert WS or not. The fix is shown in the diff2.txt The fix has been verified on the japan localized machine. How to test: ----------- open properties file to table editor, add some comment to existed pair. Modification is done also in source editor of the properties file. The comment in source editor have to be saved using Unicode escape sequence. Please, use attached patch local2.jar for testing. I would like to ask for approval for integrating this fix into NB 3.3.1. Thank you.
Created attachment 4261 [details] fix one: converting comment to unicode sequence
Created attachment 4262 [details] fix two: do not convert whitespaces to unicode sequences
Approved.
approved
Approved by QA.
Integrated in [release33] branch. /cvs/properties/src/org/netbeans/modules/properties/PropertiesTableCel lEditor.java,v <-- PropertiesTableCellEditor.java new revision: 1.21.6.1; previous revision: 1.21 /cvs/properties/src/org/netbeans/modules/properties/UtilConvert.java,v <-- UtilConvert.java new revision: 1.7.42.1; previous revision: 1.7
changed target milestone
Verified in IDE 3.3.1 RC2 (NetBeansIDE-release331-200201210331.zip)
Consistent use of the I18N keyword.
Resolved for 3.4.x or earlier, no new info since then -> closing.