« Return to Thread: Encoding problem with attachments upload/download

Encoding problem with attachments upload/download

by Колесников Михаил-2 :: Rate this Message:

Reply to Author | View in Thread

Hi all! New patch - encoding problems
Encoding problem. When you upload file with UTF name to JTrac or try to download an UTF-named attachment you browser try to save a file with incorrect (unreadable) name. To prevent such a case we must rightly encoding file name, that set up in response header.

See the patch for details:
https://sourceforge.net/tracker/?func=detail&aid=2791120&group_id=162983&atid=825943

I use http://tools.ietf.org/html/rfc2231 standard for non-IE browser and simple "percent encoding" for IE.

Tested on IE-7.0.5730.13 Opera-9.64 and FF-3.0.10 with English/Russian file names.

PS: Also I had fixed the problem with mime-type:
r.setContentType(MimeTable.getDefaultTable().getContentTypeFor(fileName));
--
С уважением, Колесников Михаил.
mailto:mixa_@...

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
j-trac-users mailing list
j-trac-users@...
https://lists.sourceforge.net/lists/listinfo/j-trac-users

attachment_encoding_problem.zip (3K) Download Attachment

 « Return to Thread: Encoding problem with attachments upload/download