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

(cs) Charset API does not distinguish malformed input from unmappable chars

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • core-libs
    • None
    • beta3
    • generic
    • generic

      The encode() and decode()
      methods within the nio converters treat both the MalformedInputException
      and UnmappableCharacterException together in doing substitution. When the
      substitute() method is used, it sets the substitituon for both.

      In the Unicode spec, MalformedInput is called "illegal code unit
      sequences". Conforming Unicode implementations are proscribed from
      treating illegal code unit seuqences as characters, and the only options
      which Unicode allows are to remove the illegal sequence, or to reject the
      illegal sequence. This is different from undefined characters, for which
      it is perfectly valid to do substitution.

            mr Mark Reinhold
            dougfelt Doug Felt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: