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.

Bug 32652 - I18N - Garbage filled in templates when using nondefault encoding
Summary: I18N - Garbage filled in templates when using nondefault encoding
Status: RESOLVED DUPLICATE of bug 55104
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords: I18N
Depends on:
Blocks: 45719
  Show dependency tree
 
Reported: 2003-04-05 12:03 UTC by hlavac
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hlavac 2003-04-05 12:03:01 UTC
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.
Comment 1 Jesse Glick 2003-04-24 14:59:40 UTC
Will be helpful if you can provide precise, step-by-step instructions
for reproducing the problem.
Comment 2 hlavac 2003-09-18 21:47:44 UTC
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() {
    }
    
}
Comment 3 hlavac 2003-09-18 22:08:08 UTC
The #65533; shown here show up as squares in the editor
Comment 4 Jan Becicka 2005-02-17 10:32:29 UTC

*** This issue has been marked as a duplicate of 55104 ***