Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4090696

Compiler is rejecting a legitimate char literal.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 1.2.0
    • tools
    • sparc
    • solaris_2.6


      allan.jacobs@Eng 1997-11-04

      JCK-114a test api/java_io/CharacterEncoding/primarySBCS.html#8859_1 fails
      when run with JDK 1.2.

      algol% /net/jde1/export/jtech20/javavm1.2/build/solaris/bin/javac -d . X.java
      X.java:4: Invalid character constant.
                      char mychar='\u0027'; // APOSTROPHE (27)
                                  ^
      1 error
      algol% java -fullversion
      java full version "1.1.4n:1997.10.16"
      algol% javac -d . X.java
      algol% cat X.java

      public class X {
          public static void main( String[] argv ) {
                      char mychar='\u0027'; // APOSTROPHE (27)
                      System.out.println(mychar);
          }
      }

            dstoutamsunw David Stoutamire (Inactive)
            ajacobssunw Allan Jacobs (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: