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 i tried to use diacritics in a build file ant complains it found an invalid XML character. Try for example <target description="äöü" name="foo"/> Then i saw the encoding declaration stated it as UTF-8 whereas the file was really encoded as ISO-8859-1, which is my systems default encoding. I changed the encoding and ant was happy. Then i modified something in my build file with the integrated editor but unfortunately it changed my new encoding declaration back to UTF-8. Since that happened all the time i finally removed the diacritics. I think there is more than one possible solution: 1. always write UTF-8 and make sure that the OutputStreamWriter or whatever you use also uses UTF-8 (unfortunately many text editors can't handle this) 2. determine from the xml file which encoding should be used and configure the OSW accordingly 3. make the encoding an ant property, so that the user can determine which one to use Solution 1 is by far the quickest but i would prefer 2 or 3.
Please see the FAQ (URL above). Making modifications to the build script in the Explorer currently uses a quick-and-dirty XML regenerator which cannot easily keep your encoding intact (so it chooses UTF-8 as the best general encoding instead). I think NetBeans 3.4 will replace the Ant module's ad-hoc XML handling code with better general code from the XML module, which should work with encodings correctly (your #2 I believe), as well as solving many other problems. As a workaround, assuming you want to keep diacritics, just edit the build script as text. The text editor will not touch the encoding declaration of course, and if the characters are in ISO-8859-1 and that is your platform default encoding, there should be no problem. It is only making modifications structurally from the Explorer view of the build script that causes the problem.
verified / closed