Bug 809517 - EPP-SP: File name is not displayed correctly if it contains Portuguese accent characters during uploading
Summary: EPP-SP: File name is not displayed correctly if it contains Portuguese accent...
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: Site Publisher
Version: 5.2.0.GA
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 5.2.1.CR02
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
: 809851 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-03 14:59 UTC by Martin Weiler
Modified: 2020-04-27 01:32 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
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.
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
EXO WCM JIRA SPREDHAT-138 0 None None None Never
Red Hat Bugzilla 813321 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Issue Tracker GTNPORTAL-2419 0 Major Resolved File name is not displayed correctly if it contains Portuguese accent characters during uploading 2012-11-05 12:11:45 UTC

Internal Links: 813321

Description Martin Weiler 2012-04-03 14:59:55 UTC
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

Comment 1 Martin Weiler 2012-04-04 14:07:07 UTC
*** Bug 809851 has been marked as a duplicate of this bug. ***

Comment 2 Martin Weiler 2012-04-04 14:10:00 UTC
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;

Comment 3 Martin Weiler 2012-04-11 09:46:58 UTC
    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.

Comment 4 Tomas Kyjovsky 2012-04-13 12:54:07 UTC
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: "&aacute;&aacute;&aacute;&aacute;&aacute; &atilde; &atilde; &atilde; &oacute;&oacute;&oacute;&oacute;"

WYSIWYG editor in ContentExplorer shows the characters correctly.

Comment 5 JBoss JIRA Server 2012-04-17 09:13:00 UTC
Honza Fnukal <hfnukal> updated the status of jira GTNPORTAL-2419 to Resolved

Comment 6 prabhat jha 2012-04-17 13:27:15 UTC
Tomas, can you please create a new issue in BZ since this patch partly fixes the problem ?


Note You need to log in before you can comment on or make changes to this bug.