[ http://jira.nuxeo.org/browse/NXP-2100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thierry Delprat updated NXP-2100: --------------------------------- Attachment: Nuxeo5-FirefoxExtension.xpi Please try with this updated version, content-encoding is now sent in the multi-part stream. > Use proper charset encoding for HTTPRequest > ------------------------------------------- > > Key: NXP-2100 > URL: http://jira.nuxeo.org/browse/NXP-2100 > Project: Nuxeo Enterprise Platform 5 > Issue Type: Bug > Components: Web Foundations > Affects Versions: 5.1.3.1 > Environment: Nuxeo platform 5.1.3.1-GA, browser uses French, Ubuntu > Reporter: Radu Darlea > Assignee: Thierry Delprat > Fix For: 5.1.4 > > Attachments: Nuxeo5-FirefoxExtension.xpi > > > The problem was spotted on a Customer project. When uploading a file > containing special characters (French, Spanish, etc.) in name, Nuxeo imports > it with the name changed. Indeed, trying to upload file Problème.XLS the > result is the document Probl�me.XLS. > The code dealing with the HTTP requests gets the HTTP body without setting > any character set encoding, and the HTTP request does not contain anyone. So > the characters are interpreted with basic character set, resulting this title. > Once I set the charset Latin for FileUploadBase Apache's class I obtained > good results: > RestletFileUpload fu = new RestletFileUpload(); > fu.setFileItemFactory(new DiskFileItemFactory()); > List<FileItem> fiList = null; > ++++++++ fu.setHeaderEncoding("ISO_8859_1"); /////////////////////// > try { > fiList = fu.parseRequest(req); > Questions: > 1. Is this the best solution to set the character encoding before > interpreting it? How could I know which character set to use? > 2. I have the feeling the encoding can be retrieved from request itself > (RestletRequest.mutipartform.encodings[0]). That means Nuxeo plugin could set > by itself. Is it possible? Would it be this a better solution? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nuxeo.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira _______________________________________________ ECM-tickets mailing list ECM-tickets@lists.nuxeo.com http://lists.nuxeo.com/mailman/listinfo/ecm-tickets