Now I want to develop a simple package tool which can modify some property in manifest.mf of jar files,but the Manifest class's putValue method only can correctly save English character.why?
And how can I put Chinese character?
the code is:
Attributes ab = mf.getMainAttributes();
Attribute values can contain any character and it will be UTF-8 encoded when written to the manifest, according to Javadoc.
What makes you think that this mechanism fails? What do you see instead of the Chinese character? And what tool/editor/program you use to see it? I did not try myself, but according to the Javadoc there should be no problem.