Honza Fnukal created GTNPORTAL-2419:
---------------------------------------
Summary: File name is not displayed correctly if it contains Portuguese
accent characters during uploading
Key: GTNPORTAL-2419
URL:
https://issues.jboss.org/browse/GTNPORTAL-2419
Project: GateIn Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 3.3.0.Final
Reporter: Honza Fnukal
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
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;
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira