diff --git a/source/java/org/alfresco/repo/action/executer/ImporterActionExecuter.java b/source/java/org/alfresco/repo/action/executer/ImporterActionExecuter.java index 754cd9c4b0..905e8b7fcd 100644 --- a/source/java/org/alfresco/repo/action/executer/ImporterActionExecuter.java +++ b/source/java/org/alfresco/repo/action/executer/ImporterActionExecuter.java @@ -75,6 +75,8 @@ public class ImporterActionExecuter extends ActionExecuterAbstractBase private static final String TEMP_FILE_SUFFIX_ACP = ".acp"; private static final String TEMP_FILE_SUFFIX_ZIP = ".zip"; + private boolean highByteZip = false; + /** * The importer service */ @@ -135,6 +137,22 @@ public class ImporterActionExecuter extends ActionExecuterAbstractBase this.fileFolderService = fileFolderService; } + /** + * @return the highByteZip encoding switch + */ + public boolean isHighByteZip() + { + return this.highByteZip; + } + + /** + * @param highByteZip the encoding switch for high-byte ZIP filenames to set + */ + public void setHighByteZip(boolean highByteZip) + { + this.highByteZip = highByteZip; + } + /** * @see org.alfresco.repo.action.executer.ActionExecuter#execute(org.alfresco.repo.ref.NodeRef, org.alfresco.repo.ref.NodeRef) */ @@ -184,8 +202,7 @@ public class ImporterActionExecuter extends ActionExecuterAbstractBase // NOTE: This encoding allows us to workaround bug: // http://bugs.sun.com/bugdatabase/view_bug.do;:WuuT?bug_id=4820807 // We also try to use the extra encoding information if present - // ALF-2016 - zipFile = new ZipFile(tempFile, "UTF-8", true); + zipFile = new ZipFile(tempFile, isHighByteZip() ? "Cp437" : null, true); // build a temp dir name based on the ID of the noderef we are importing // also use the long life temp folder as large ZIP files can take a while