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

A character string retrieved from database is truncated at illegal position.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.2.2_005
    • 1.2.2
    • core-libs
    • 005
    • x86
    • windows_nt
    • Verified



        Name: clC74495 Date: 12/22/99


        Symptom: A character string retrieved from database is truncated at illegal
        position, if the string contains a character whose lower byte is zero. For
        instance, a character string "\uff21\uff22\u3000\uff23\uff24" is truncated
        at \u3000.

        It seems to me that the JdbcOdbcObject.BytesToChar() method considers \u3000
        as the null termination character. The method tries to find the first null
        character in the string by comparing the string and null (=0), character by
        character. However, the method casts a character data type into a byte data
        type before the comparison. This causes the higher byte of a character is
        lost. Then the method misunderstand \u3000 as the null termination.

        Note: "\uff21\uff22\u3000\uff23\uff24" is full width A,B, space, C and D.
        (Review ID: 99236)
        ======================================================================

              jellissunw Jon Ellis (Inactive)
              clucasius Carlos Lucasius (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: