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

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

XMLWordPrintable

    • x86
    • windows_2000, windows_xp

      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.

            sherman Xueming Shen
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: