• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Zipping files using ZipOutputStream  RSS feed

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've a group of files and I'm trying to zip them all in a zip file using ZipOutputStream and ZipEntry classes. Everything is ok but I've a problem with arabic file names. When any of my files is named in arabic, it is put inside the zip file succesffully but the name is corrupted. I tried encoding the file name before I put it in the ZipEntry collection but I get the same problem.

Any ides regarding encoding ZipOutputStream? or any other API that I can use to handle this issue?

best regards.
 
Sheriff
Posts: 3015
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very interesting. It looks like this has been a longstanding problem, and not just with Arabic, but any non-ASCII file names. There seems to be a fix for it in Java 7. If you can't use Java 7 (which is still in beta I think), you might have to find another workaround.
 
Never trust an airline that limits their passengers to one carry on iguana. Put this tiny ad in your shoe:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!