mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fixed AR-346 and AWC-497: Extended characters in filenames not handled.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2319 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -22,7 +22,6 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
@@ -95,6 +94,9 @@ public class UploadFileServlet extends BaseServlet
|
||||
String filename = item.getName();
|
||||
if (filename != null && filename.length() != 0)
|
||||
{
|
||||
// ensure that the encoding is handled correctly
|
||||
filename = new String(filename.getBytes(), "UTF8").toString();
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Processing uploaded file: " + filename);
|
||||
|
||||
|
Reference in New Issue
Block a user