Commons Codec
  1. Commons Codec
  2. CODEC-5

[codec] Hex converts illegal characters to 255

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.3
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

      Description

      List: jakarta-commons-dev
      Subject: [codec] Proposal for improvement Hex codec
      From: Tom van den Berge <tom.vandenberge () bibit ! com>
      Date: 2004-04-15 8:49:31
      Message-ID: <407E4C9B.5070701 () bibit ! com>
      [Download message RAW]

      I'm using the Hex codec to decode e.g. the string "qq". What surprises
      me is that this obviously illegal hex value is decoded into one byte
      value 255. In fact all non-hex 'character-pairs' are decoded to value 255.

      Wouldn't it be better to throw a DecoderException if illegal characters
      are passed in?

      The current implementation decodes values that is is actually not able
      to decode, which is wrong.

      Cheers,
      Tom

        Activity

        Mark Thomas made changes -
        Reporter Gary Gregory [ ggregory@seagullsw.com ] Gary D. Gregory [ garydgregory ]
        Mark Thomas made changes -
        Workflow jira [ 12370312 ] Default workflow, editable Closed status [ 12601584 ]
        Henri Yandell made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Henri Yandell made changes -
        Bugzilla Id 28455
        Fix Version/s 1.3 [ 12311737 ]
        Henri Yandell made changes -
        Affects Version/s 1.2 Final [ 12311844 ]
        Henri Yandell made changes -
        Component/s Codec [ 12311105 ]
        Affects Version/s 1.2 Final [ 12311661 ]
        Key COM-1255 CODEC-5
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Project Commons [ 12310458 ] Commons Codec [ 12310464 ]
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 28455 12341407
        ggregory@seagullsw.com created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Gary Gregory
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development