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

1.1 compiler can't accept unicode-escape \u000D

XMLWordPrintable

    • sparc
    • solaris_2.5.1

      javac can't compile java-code with Unicode-escape \u000D
      Note that the similar bug (bugID 4086919) for line terminators represented
      with Unicode-escapes within string literals has been integrated in jdk1.2beta2.
      So I have filed new bug for jdk1.1.6

      The following tests are failed due to this bug:

      lang/LEX/lex054/lex05402/lex05402.html
      lang/LEX/lex054/lex05403/lex05403.html
      lang/LEX/lex058/lex05802/lex05802.html

      See "lex00503" source and results below:

      ============ lex00503.java ==========
      package javasoft.sqe.tests.lang.lex005.lex00503;

      import java.io.PrintStream;
        
      public class lex00503 {
      public static void main(String argv[]) {
      System.exit(run(argv, System.out) + 95/*STATUS_TEMP*/);
      }

      public static int run(String argv[],PrintStream out) {
      /*--- Line terminator `carriage return` as Unicode-escape. ---*/
      int a; \u000D
      return 0/*STATUS_PASSED*/;
      }
      }
      ========= end lex00503.java ==========

      % java -fullversion
      java full version "JDK1.1.6H"
      % javac -d . lex00503.java
      lex00503.java:17: Invalid character in input.
      int a; \u000D
      ^
      1 error
      %

            dstoutamsunw David Stoutamire (Inactive)
            oulyankisunw Oleg Ulyankin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: