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 you change default Java file encoding to something different from system default encoding, like UTF-8 on computer that has windows-1250 as default, then create a new Java source file from template, template gets filled in incorrectly if any of the filled-in texts (user name, creation date) contain non-ASCII chracters.
Will be helpful if you can provide precise, step-by-step instructions for reproducing the problem.
Here it is (for 3.5.1) on my czech locale machine with windows-1250 default encoding: 1) Start ide, create a new project, mount some empty directory 2) Go to Tools/Options,Editing/Java sources, go to Strings table property and change USER to a name with accented characters (like USER=Jeíek ). Close the options. 3) Create a new class using the Java Class template. Give it Somename and press Finish. This will produce correct result, which may look like (note the accented characters in localized date and in @author): /* * Somename.java * * Created on 18. záøí 2003, 22:46 */ /** * * @author Jeíek */ public class Somename { /** Creates a new instance of Somename */ public Somename() { } } 4) Now go to Tools/Options,Editing/Java Sources,Expert pane, and change Default Encoding property to UTF-8. Close options. 5) Repeat step 3) creating class Somename2. This time, it will look like this (note the damaged accented characters caused by generating the source code using platform default windows-1250 encoding instead of UTF-8, and then using it like if it was UTF-8): /* * Somename2.java * * Created on 18. z��� 2003, 22:49 */ /** * * @author Je��ek */ public class Somename2 { /** Creates a new instance of Somename2 */ public Somename2() { } }
The #65533; shown here show up as squares in the editor
*** This issue has been marked as a duplicate of 55104 ***