| Summary: | Cannot import a file with unicode characters in the filename | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Anthony Hunter <ahunter.eclipse> | ||||||
| Component: | Client | Assignee: | Anthony Hunter <ahunter.eclipse> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | john.arthorne, mamacdon | ||||||
| Version: | 6.0 | ||||||||
| Target Milestone: | 6.0 M1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 242073 [details]
Example file
filename with emoji characters
HTTP headers doesn't support UTF-8. So when the filename is being passed using the Slug header, the header needs to be URL-encoded. I have added two Junit tests (for the attached files) and updated the TransferServlet This is commit: http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=ff01a12aa3b76c6a2c3dba2101ee24c1c5075012 We still need to fix the client. Client side has been fixed with commit: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=0e7e139f2e488af26ff02d87d3864eaa1d0ba0df This is kind of a nit, but Slug [1] is not decoded correctly by URLDecoder. The difference is how a '+' is treated: in an RFC-compliant Slug header it means a literal plus sign, but URLDecoder will convert it into a space. We have existing code in the client and server to deal with Slugs, so I moved that into helpers and called it from TransferServlet and the places in the client code as well. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=6c5a611 http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=e31ebd6 [1] http://tools.ietf.org/html/rfc5023#section-9.7.1 whoops, forgot the change to fileCommands.js, so one more commit here: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=cb241a1 |
Created attachment 242072 [details] Example file Select "File->Import->File System" and choose a file with unicode, DBCS or emoji characters. The import gets stuck in the UI and I cannot continue or cancel with the X. I have to refresh the page and the import was not completed.