Giter Club home page Giter Club logo

gradle-manifest-multibyte-demo's Introduction

Multibyte characters are split in two

Demo that Gradle produces JAR files with cut-apart multibyte characters

Run

./gradlew jar

Then inspect the file ./build/lib/gradle-manifest-multibyte-demo.jar/META-INF/MANIFEST.MF. Some multibyte characters are cut apart, because each line ends at exactly 72 bytes.

A copy of that MANIFEST.MF can be found at src/main/resources/MANIFEST.MF.

Demo that Java (on which Gradle relies to generate manifest) also cuts the multibyte characters

Run

./gradlew run

You will see an analysis of both files src/main/resources/MANIFEST.MF and src/main/resources/MANIFEST2.MF (identical files, the first with cut UTF-8 characters, the other one has all characters intact). First you see how the attributes are represented when you deserialize the manifest using the java.util.jar.Manifest class from Java (identical for both files). Then you see how the same class serializes the manifest (also identical).

The JAR File Specification states that the lines in a MANIFEST.MF file must be no longer than 72 bytes (explicitly not 72 characters). It does not explicitly say if it's ok to split multibyte characters.

gradle-manifest-multibyte-demo's People

Contributors

floscher avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.