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

Omitted characters in String.getBytes()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.1.2
    • core-libs
    • None
    • x86
    • windows_95



      Name: joT67522 Date: 09/02/97


      Characters > 127 in a String cause the next character to be
      skipped in the byte array returned by String.getBytes().

      String s = "Über Östrogene...";
      byte[] b = s.getBytes( s);
      System.out.println( "The string now reads: " + (new String( b)));

      This prints:

      The string now reads: Üer Ötrogene...

      As String.getBytes() uses a CharToByteConverter, the bug should
      there.

      company - GMD , email - ###@###.###
      ======================================================================

            ssenthilsunw Shanmugam Senthil (Inactive)
            johsunw Joon Oh (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: