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

unix: method String.getBytes(String enc) throws java.lang.InternalError

XMLWordPrintable

    • beta
    • x86, sparc
    • linux, solaris_7
    • Verified



      Name: asR10013 Date: 04/27/2000


          The following code demonstrates unexpected behavior of the JVM.
      Exception java.lang.InternalError is thrown as a result of method
      String.getBytes invocation on line 4.

      ------------------------ test.java -----------------------------------
      1 class test {
      2 public static void main(String args[]) throws Exception {
      3 String s = "\u3000";
      4 byte[] ba = s.getBytes("Cp933");
      5 }
      6 }
      -------------------------- output ------------------------------------
      $ java -version
      java version "1.3.0beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0beta-b01)
      Classic VM (build 1.3.0beta-b01, green threads, nojit)
      $ java test
      Exception in thread "main" java.lang.InternalError: Converter malfunction: sun.io.CharToByteCp933
              at java.lang.String.getBytes(String.java:633)
              at java.lang.String.getBytes(String.java:665)
              at test.main(test.java:4)
      ----------------------------------------------------------------------

          The same results are observed under linux java version "1.2.2",
      Solaris java version "1.2.2" and Solaris java version "1.3.0rc3".
          
      ======================================================================

            ilittlesunw Ian Little (Inactive)
            alssunw Als Als (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: