Description of problem: When uploading files whose names containing Portuguese accent characters it shows incorrect chars Steps to Reproduce: 1) configure JBoss run.conf by setting -Duser.country=BR -Duser.language=pt. 2) set browser language to pt_BR. set the ecmdemo language as pt_BR. 3) open site publisher EPP 5.2 4) when uploading files whose names containing accent characters it shows incorrect chars
*** Bug 809851 has been marked as a duplicate of this bug. ***
https://jira.exoplatform.org/browse/EXOGTN-735 needs to be ported to the EPP 5.2 code base: --- component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java (.../UploadHandler.java) +++ component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java (.../UploadHandler.java) @@ -101,7 +101,8 @@ } value.append("\n \"").append(uploadIds[i]).append("\": {"); value.append("\n \"percent\":").append('\"').append((int)percent).append("\","); - value.append("\n \"fileName\":").append('\"').append(encodeName(upResource.getFileName())) + String fileName = EntityEncoder.FULL.encode(upResource.getFileName()); + value.append("\n \"fileName\":").append('\"').append(encodeName(fileName)) .append("\""); value.append("\n }"); if (i < uploadIds.length - 1) --- component/web/server/src/main/java/org/exoplatform/upload/UploadService.java (.../UploadService.java) +++ component/web/server/src/main/java/org/exoplatform/upload/UploadService.java (.../UploadService.java) @@ -124,7 +124,6 @@ if (fileName == null) fileName = uploadId; fileName = fileName.substring(fileName.lastIndexOf('\\') + 1); - fileName = EntityEncoder.FULL.encode(fileName); String storeLocation = uploadLocation_ + "/" + uploadId + "." + fileName;
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: After uploading a file with special characters in the name, the displayed file name showed incorrect characters. This has been fixed, and special characters in file names are now handled correctly during file upload.
Verified with EPP-5.2.1.CR2 + jboss-eppsp-5.2.1.ER02-exo-2.3.6-CP01-120322114606. The titles of uploaded files are ok, however there is another problem which seems even more serious: the uploaded file with title "ááááá ã ã ã óóóó.txt" cannot be saved when/after edited. javax.jcr.PathNotFoundException: Node not found /sites content/live/%26aacute;%26aacute;%26aacute;%26aacute;%26aacute; %26atilde; %26atilde; %26atilde; %26oacute;%26oacute;%26oacute;%26oacute;.txt This probably calls for a separate bug report. Additionally, the view template for text files doesn't seem display these characters correctly as well. When a text file which contains "ááááá ã ã ã óóóó" is open in ContentExplorer it shows: "ááááá ã ã ã óóóó" WYSIWYG editor in ContentExplorer shows the characters correctly.
Honza Fnukal <hfnukal> updated the status of jira GTNPORTAL-2419 to Resolved
Tomas, can you please create a new issue in BZ since this patch partly fixes the problem ?