Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 419740 - Cannot use non-English characters in file names
Summary: Cannot use non-English characters in file names
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.0 RC3   Edit
Assignee: Mark Macdonald CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-17 11:54 EDT by Mark Macdonald CLA
Modified: 2013-10-18 14:29 EDT (History)
4 users (show)

See Also:
ken_walker: review+
simon_kaegi: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Macdonald CLA 2013-10-17 11:54:42 EDT
Tried master and orion.eclipse.org. Using Chrome 30.

i) Creating files
 1. From the sidebar navigator, try to create a file named "Copy of 你好.js"
 2. "An unknown error occurred"

ii) Renaming files
 1. Try to rename an existing file to "Copy of 你好.js"
 2. "An unknown error occurred"

iii) Opening an existing file
 1. I have an existing file named "Copy of 你好.js"
 2. From the sidebar nav, click the file.
 3. "File not found: /file/mamacdon/project/Copy%20of%20你好.js"



For (i) and (ii), the internal error being thrown is from xhr:
> SyntaxError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': 'Copy of 你好.js' is not a valid HTTP header field value.
> (anonymous function) (xhr.js:162)
> _xhr (xhr.js:161)

For (iii) the link href appears to be wrong (or maybe it is right, and the inputManager is wrong. I can't tell anymore).
> The URL is /file/mamacdon/myProject/Copy%2520of%2520%E4%BD%A0%E5%A5%BD.js
Comment 1 Mark Macdonald CLA 2013-10-17 12:03:46 EDT
OK, ignore (iii) -- that was due to me not clearing my cache. However (i) and (ii) are legit problems.
Comment 2 Mark Macdonald CLA 2013-10-17 19:08:22 EDT
Client changes: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=6181a54
(Encodes the Slug header to prevent browser exceptions)

Server changes: http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=02e8b63
(Decodes the Slug header, removes the hack from bug 376671 that made Name field override Slug)

The Node server works with non-ASCII characters, but fails in many other cases. I opened bug 419774 for that, as the problem is pervasive and does not look safe to fix right now.
Comment 3 Simon Kaegi CLA 2013-10-18 09:11:46 EDT
What about "+" ? URLDecoder will decode "+" to " ". It would be good to have a testcase here. That ensured that a filename that included all of the ascii characters worked.
Comment 4 Maciej Bendkowski CLA 2013-10-18 11:55:37 EDT
(In reply to Mark Macdonald from comment #1)
> OK, ignore (iii) -- that was due to me not clearing my cache. However (i)
> and (ii) are legit problems.

This shouldn't be ignored. I have a test case to reproduce. See bug 419873.
Comment 6 Mark Macdonald CLA 2013-10-18 13:44:31 EDT
Previous patch was missing some test changes. Here is the correct one.

http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=6826f69
Comment 7 Mark Macdonald CLA 2013-10-18 14:29:00 EDT
Pushed
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=8726128
http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=524c4a2

However the server side is not bulletproof in its treatment of the Slug header, see bug 419876