JDK-6366696 : javac in JDK 1.5 produces compilation warning message for comment lines containing the "��" character
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2005-12-22
  • Updated: 2010-04-02
  • Resolved: 2005-12-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0Resolved
Related Reports
Duplicate :  
Description
Most of the Java Card source files contain a copyright line with the �� character, which results in a compilation warning when using javac from JDK 1.5.  These used to compile without warning using javac from JDK 1.4.x.

The javac (ver. 1.5) warning message is:  "unmappable character for encoding ASCII"

Our only option is to use the javac -nowarn option, but that is unacceptable.

Sun legal requires us to use the �� character instead of (c).
If you believe this is not the case, please send us a statement from Sun legal.

But, consider that customers may also want to insert copyright statments which include the �� character.

==================== file copyright.java

// Copyright �� 2003 Sun Microsystems, Inc.

public class copyright {

  public static void main(String[] args){
    System.out.println("done");
  }

}

1) set JAVA_HOME to JDK1.4.x and compile:

jcdi-qa-1 (26) % $JAVA_HOME/bin/java -version
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
jcdi-qa-1 (27) % $JAVA_HOME/bin/javac copyright.java

(there is no compilation warning).


2) set JAVA_HOME to JDK1.5.0 and compile:

jcdi-qa-1 (29) % $JAVA_HOME/bin/java -version
java version "1.5.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot(TM) Server VM (build 1.5.0_01-b08, mixed mode)


jcdi-qa-1 (30) % $JAVA_HOME/bin/javac copyright.java
copyright.java:1: warning: unmappable character for encoding ASCII
// Copyright ? 2003 Sun Microsystems, Inc.
             ^
1 warning

===============================================================================