-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Preview
-
Release Notes Summary:A Zip decoding charset fallback mechanism can now be contributed.
-
Tags:
-
Backlog priority:600
-
Upgrade notes:
-
Sprint:nxplatform #103, nxplatform #104
-
Story Points:5
Steps to reproduce
- create a new File document by importing the ZIP archive "CRIPS test.zip" (see first comment)
- observe that the preview is not displayed
- in the logs there is an error
ERROR [WebEngineExceptionMapper] org.nuxeo.ecm.core.api.NuxeoException: java.util.zip.ZipException: invalid CEN header (bad entry name) org.nuxeo.ecm.core.api.NuxeoException: java.util.zip.ZipException: invalid CEN header (bad entry name) at org.nuxeo.ecm.platform.convert.plugins.Zip2HtmlConverter.listNamesAndCreateIndex(Zip2HtmlConverter.java:76) ~[nuxeo-platform-convert-2021.4.16.jar:?] at org.nuxeo.ecm.platform.convert.plugins.Zip2HtmlConverter.convert(Zip2HtmlConverter.java:61) ~[nuxeo-platform-convert-2021.4.16.jar:?] at org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.convert(ConversionServiceImpl.java:340) ~[nuxeo-core-convert-2021.7.15.jar:?] at org.nuxeo.ecm.platform.preview.adapter.ZipPreviewer.getPreview(ZipPreviewer.java:74) ~[nuxeo-preview-core-2021.1.19.jar:?] ... Caused by: java.util.zip.ZipException: invalid CEN header (bad entry name) at java.util.zip.ZipFile$Source.zerror(ZipFile.java:1607) ~[?:?] at java.util.zip.ZipFile$Source.checkUTF8(ZipFile.java:1370) ~[?:?] at java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1570) ~[?:?] at java.util.zip.ZipFile$Source.<init>(ZipFile.java:1308) ~[?:?] at java.util.zip.ZipFile$Source.get(ZipFile.java:1271) ~[?:?] at java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:733) ~[?:?] at java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:850) ~[?:?] at java.util.zip.ZipFile.<init>(ZipFile.java:248) ~[?:?] at java.util.zip.ZipFile.<init>(ZipFile.java:177) ~[?:?] at java.util.zip.ZipFile.<init>(ZipFile.java:191) ~[?:?] at org.nuxeo.ecm.platform.convert.plugins.Zip2HtmlConverter.listNamesAndCreateIndex(Zip2HtmlConverter.java:73) ~[nuxeo-platform-convert-2021.4.16.jar:?] ... 126 more
The error seems to be related to the default encoding used to open the ZIP archive (UTF-8)
By using the CP850 encoding, the ZIP file is correctly opened and its content is correctly listed (the accents are well displayed)
- is related to
-
NXDOC-2633 Document ZipFile charset fallback mechanism
- Resolved