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.
When a xml file has encoding like ISO-8859-1 and if a bean string value has multibytes, then these multibytes are corrupted in the result xml file. I think that schema2beans should check the encoding of the result file and also whether the conversion to the encoding was done correctly. Maybe the write method should throw an encoding exception. Usually the xml files has UTF-8 encoding and then it works ok.
Will be fixed for 5.5 if time permits. Not entirely clear at this point how much work it will require. In any case, I can't make it throw any checked exceptions (too many clients to change for that), have to investigate what throwing a runtime exception would mean.
What is the scenario for this situation from user view - want to see what kind of impact to them and change priority perhaps to p2 - user should be able to use characters of their language. ken.frank@sun.com
A typical scenario would be as follows: 1. have an xml file, for example web.xml 2. change its encoding to ISO-8859-1 3, insert some non-ISO-8859-1 characters, save and close the file 4. when you open it, these characters are replaced by question marks Basically, users may use any characters they wish as long as the encoding of the file is set correctly.
Thinking about this further, I don't think that this issue can be fixed in schema2beans - it can't be changed to throw exceptions at this point, and on the other hand it shouldn't be schema2beans' task to display any dialogs. I think this issue must be solved for each editor separately. However, it should be possible to fix this in xml/multiview (I'll file a new issue against it), so at least all editors based on it will be fixed at once.
I see the warning now when try to save file of this scenario - is that ok fix for this as to verifying it ? I think the problem is, that even though at runtime the non ascii characters wont be processed/viewed ok since encoding of xml file is 8859-1, that at least in ide, they should still show ok ? also, Erno, you mentioned in comments below a separate issue would be filed related to this - what is the bug id - I want to see if it needs verification (or if not filed yet, let me know details and I can file it) ken.frank@sun.com