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

java.util.jar.Attributes.writeMain() can't handle multi-byte chars

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 5.0, 6
    • Fix Version/s: None
    • Component/s: core-libs
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_2000, windows_xp

      Description

      FULL PRODUCT VERSION :
      java version "1.5.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
      Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      There's a comment in the javadoc for java.util.jar.Attributes.writeMain():

       "XXX Need to handle UTF8 values and break up lines longer than 72 bytes"

      The API docs for the Attributes class state:

      "Attribute values can contain any characters and will be UTF8-encoded when written to the output stream."

      This has been the case since 1.2.2 at least.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Don't use java.util.jar.Manifest if there's any chance of an attribute value being in some multi-byte encoding.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sherman Xueming Shen
                Reporter:
                gmanwanisunw Girish Manwani (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported:
                  Indexed: