Project

General

Profile

Actions

Defect #7288

closed

Non ASCII filename downloaded from repo is broken on Internet Explorer.

Added by Kesarr B over 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Toshi MARUYAMA
Category:
SCM
Target version:
Start date:
2011-01-11
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

On Internet Explorer, a filename downloded from repository is broken, because that filename is consist of multibyte characters. But, that is absolutely normal on Chrome.
In addition, attached files in the Redmine "files" page have no problem.

I think that this code has no problem,

./controllers/attachments_controller.rb:
    send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),

... and this code has a problem.

./controllers/repositories_controller.rb:
    send_data @content, :filename => @path.split('/').last

I test that modification like below, and it seems successful!

    send_data @content, :filename => filename_for_content_disposition(@path.split('/').last)

In my opinion, some of other

send_data
s can have similar problems.


Files

redmine_repository_download_original.png (48.6 KB) redmine_repository_download_original.png (WRONG) send_data @content, :filename => @path.split('/').last Kesarr B, 2011-01-11 12:34
redmine_repository_download_modified.png (49.1 KB) redmine_repository_download_modified.png (RIGHT) send_data @content, :filename => filename_for_content_disposition(@path.split('/').last) Kesarr B, 2011-01-11 12:34
ie-before.png (39.3 KB) ie-before.png Toshi MARUYAMA, 2011-02-12 13:16
ie-after.png (36.5 KB) ie-after.png Toshi MARUYAMA, 2011-02-12 13:16
Actions

Also available in: Atom PDF