ZIP module and ISO-8859-1 filenames
Friday, 20 October 2017 · 2 messages
AB
Andre Bovy20 Oct 2017 16:13 #
<DEAR>BaseX</DEAR>I am using the ZIP module for different purpose and until now I didn’t have any problem.
Yesterday I received a ZIP file generated by an application and it was impossible to open the file in BaseX. I tried to write a little class opening it in Java. Same behaviour.
After different tries, I noticed that the filenames were containing special characters encoded in ISO-8859-1 In my class, I used the java.util.zip.ZipFile method with a charset parameter. It works perfectly.
Is there a way to do that with the present ZIP module ?
If not, could you please modify the ZIP module to allow the process of ZIP file or ZIP entry with encoded filenames different from UTF-8
Thank you in advance
André
CG
Christian Grün20 Oct 2017 16:19 #
Hi Andre,
I think that should be possible. We have stopped maintenance the ZIP module some time ago, so I would tend to include the changes in the Archive Module.
I you could provide me with a simple Java snippet with the ZipFile call, and a little archive, that’d be great.
Best,
Christian
Quoted text · Andre Bovy · 16 lines
On Fri, Oct 20, 2017 at 4:13 PM, Andre Bovy <andre.bovy at gmail.com> wrote: > <DEAR>BaseX</DEAR> > > I am using the ZIP module for different purpose and until now I didn’t have any problem. > > Yesterday I received a ZIP file generated by an application and it was impossible to open the file in BaseX. > I tried to write a little class opening it in Java. Same behaviour. > > After different tries, I noticed that the filenames were containing special characters encoded in ISO-8859-1 > In my class, I used the java.util.zip.ZipFile method with a charset parameter. It works perfectly. > > Is there a way to do that with the present ZIP module ? > If not, could you please modify the ZIP module to allow the process of ZIP file or ZIP entry with encoded filenames different from UTF-8 > > Thank you in advance > André
Written for BaseX 8.6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery