3

I'm using the class JarOutputStream to deploy a Jar from my system. I put some files inside the jar using the class JarEntry to do it.

The problem is: When i put a file that has some "special" characters like "Módulo de Conteúdo Local.wfre", the file goes to the JAR with the name: "M+¦dulo de Conte+¦do Local.wfre"

My original code is something like:

JarEntry jarAdd = new JarEntry(fileEntryName.replace('\', '/')); out.putNextEntry(jarAdd);

I tried to do something like:

JarEntry jarAdd = new JarEntry(URLDecoder.decode(fileEntryName.replace('\', '/'), "UTF-8")); out.putNextEntry(jarAdd);

But didn't worked.

Hope someone can help me :)

Saeger
  • 314
  • 3
  • 10
  • I found something here in stackoverflow that maybe is the path for my problem: http://stackoverflow.com/questions/106367/add-non-ascii-file-names-to-zip-in-java – Saeger Jan 16 '12 at 17:09

0 Answers0