Get FileAttachment with fileName in unicode throw exception

Bug #483174 reported by true_cp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
Status tracked in 1.0
1.0
Fix Released
Undecided
Erwan Loisant
1.1
Fix Committed
Undecided
Unassigned

Bug Description

If fileNmae is not latin character-set, like Chinese, Japness, An exception will throw.

Attached is the exception trace.

Revision history for this message
true_cp (true-cp) wrote :
Revision history for this message
true_cp (true-cp) wrote :
Erwan Loisant (eloisant)
Changed in play:
status: New → Confirmed
assignee: nobody → Erwan Loisant (eloisant)
Revision history for this message
Erwan Loisant (eloisant) wrote :

Hi,

Sorry, I thought I had a repro but actually I don't. It works for me. Could you please:
* Tell me the version of Play and the platform you're using (Win/Mac/Linux)
* Upload a sample Play application where you can reproduce the bug (please make it as simple as possible)

Thank you!

Changed in play:
status: Confirmed → New
Revision history for this message
Guillaume Bort (guillaume-bort) wrote :

Ok so, the bug is fixed. We now use both encoding: RFC2231 and plain URLEncoded.

However there is still no standard way to put a chinese name in a Content-Disposition header that will work on any browser. Check here: http://greenbytes.de/tech/tc2231/

It will work on firefox (as it support RFC2231) perhaps on some IE using the URLEncoded bug, but not on Safari nor Chrome.

The only way to have a proper name is to use the name in the URL: /files/测试图片.gif and let the browser safe the file using the URL name.

Changed in play:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.