Bug 238263 - Missing manifestEncoding attribute from copylibs
Missing manifestEncoding attribute from copylibs
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Project
8.1
PC All
: P2 with 1 vote (vote)
: 8.2
Assigned To: Tomas Zezula
issues@java
:
Depends on: 262429 262430
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-12 10:40 UTC by t_gergely
Modified: 2016-06-15 01:53 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description t_gergely 2013-11-12 10:40:34 UTC
If UTF-8 is used in manifest.mf (eg. Application-Name) and the OS default encoding is different (it sure is in Windows), the manifest in the jar will be "double encoded".

As a workaround, I added manifestEncoding="${source.encoding}" attribute to the copylibs tag in build-impl.xml
Comment 1 t_gergely 2016-02-05 12:38:49 UTC
2+ years have passed. How can I help?
Comment 2 Tomas Zezula 2016-06-14 08:59:28 UTC
The problem is a bit more difficult as the manifest is processed on more places.
1st) It's copied to tmpfile
2nd) It's optionally extended by Main-Class, Profile, etc depending on presence of main class, JDK8 Profiles ...
3rd) It's inserted into the jar by copylibs or jar task.

The output encoding of written manifest in jar, copylibs and manifest task is always UTF-8. So the copy of manifest needs to convert manifest from source.encoding to UTF-8 and all following manifest, jar, copylibs task need manifestEncoding=UTF-8.
Comment 3 Tomas Zezula 2016-06-14 13:38:24 UTC
Fixed for Ant J2SEProject, WebStart and J2SE Embedded.
The same problem is probably in JavaFx project.
I will create a new issue and evaluate.
Comment 4 t_gergely 2016-06-14 14:24:16 UTC
(In reply to Tomas Zezula from comment #3)
> Fixed for Ant J2SEProject, WebStart and J2SE Embedded.
> The same problem is probably in JavaFx project.
> I will create a new issue and evaluate.

Thanks. What about javaee.project?
Comment 5 Tomas Zezula 2016-06-14 16:57:22 UTC
The J2SE Deploy completely ignores user manifest, I've created issue #262429.
The JavaFx project ignores user manifest as well, issue #262430.
The J2EE is basically a copy of J2SE but maintained by someone else, the patch should be easy to migrate. I will fill an issue for j2ee and add a link here.
Comment 6 Tomas Zezula 2016-06-14 17:17:43 UTC
The j2ee issue #262431.
Comment 7 Quality Engineering 2016-06-15 01:53:23 UTC
Integrated into 'main-silver', will be available in build *201606150002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/472eec6c219c
User: Tomas Zezula <tzezula@netbeans.org>
Log: #238263:Missing manifestEncoding attribute from copylibs


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo