プロジェクト

全般

プロフィール

Vote #71588

完了

Uploading of attachments which filename contains non-ASCII chars fails with Ruby 1.9

Admin Redmine さんが4年以上前に追加. 4年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Ruby support_33
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
33
version_id:
40
issue_org_id:
10575
author_id:
6508
assigned_to_id:
0
comments:
4
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Hi,

Not sure why but I have an Internal error when uploading a document which filename contains a "é" to an issue I'm watching.

It can be reproduced with a simple ??é.txt?? file.

Running 1.9p125 and mongrel with no patch as script/server.

Log is as follow:

Processing IssuesController#update (for 10.132.21.139 at 2012-03-30 09:21:24) [PUT]
 Parameters: {"_method"=>"put", "authenticity_token"=>"X3zSAzHsi/w6jcN6XPtTUO6dSRyEYZ0h04nB1weQICk=", "issue"=>{"is_private"=>"0", "project_id"=>"26", "tracker_id"=>"1", "subject"=>"Test", "description"=>"", "status_id"=>"1", "priority_id"=>"4", "assigned_to_id"=>"", "category_id"=>"", "fixed_version_id"=>"", "parent_issue_id"=>"", "start_date"=>"", "due_date"=>"", "estimated_hours"=>"", "done_ratio"=>"0", "custom_field_values"=>{"6"=>""}, "lock_version"=>"2"}, "time_entry"=>{"hours"=>"", "activity_id"=>"", "comments"=>""}, "notes"=>"", "attachments"=>{"1"=>{"file"=>#, "description"=>""}}, "last_journal_id"=>"1764", "commit"=>"Soumettre", "controller"=>"issues", "action"=>"update", "id"=>"804"}
Saving attachment 'D:/redmine/files/120330092124_814a32383afcebc0007413871a7a145e.txt' (3 bytes)

ActionView::TemplateError (incompatible character encodings: UTF-8 and ASCII-8BIT) on line #4 of app/views/mailer/issue_edit.text.erb:
1: <%= l(:text_issue_updated, :id => "##{@issue.id }", :author => @journal.user) %>

2:
3: <% details_to_strings(@journal.details, true).each do |string| -%>
4: <%= string %>
5: <% end -%>
6:
7: <%= @journal.notes if @journal.notes? %>

   app/views/mailer/issue_edit.text.erb:4:in `concat'
   app/views/mailer/issue_edit.text.erb:4:in `block in _run_erb_app47views47mailer47issue_edit46text46erb'
   app/views/mailer/issue_edit.text.erb:3:in `each'
   app/views/mailer/issue_edit.text.erb:3
   app/models/mailer.rb:442:in `render_multipart'
   app/models/mailer.rb:78:in `issue_edit'
   app/models/journal_observer.rb:26:in `after_create'
   C:/Ruby193/lib/ruby/1.9.1/observer.rb:195:in `block in notify_observers'
etc.

Encoding configuration is: ??UTF-8, ISO 8859-15, CP1252??

References to potentially related issues reported by Toshi:


journals

Seems to be ok with ruby 1.9.3p0 on webrick??
--------------------------------------------------------------------------------
I reproduced with a simple é.txt file on trunk.

# Create New Issue.
# Update Issue with é.txt file attachment.

* CentOS 6.0(x86)
* Ruby 1.9.2-p290 and Ruby 1.9.3-p125
* passenger (3.0.8)
* Apache 2.2.15

Encoding configuration is: "" (no setting)

I think this is Issue's "Update" only problem.
--------------------------------------------------------------------------------
I did not reproduce with Ruby 1.8.7.
--------------------------------------------------------------------------------
I was able to reproduce with webrick + ruby 1.9.3 when updating an issue.
It's fixed in r9334.
--------------------------------------------------------------------------------


related_issues

relates,Closed,4050,Ruby 1.9 support

Admin Redmine さんが4年以上前に更新

  • カテゴリRuby support_33 にセット
  • 対象バージョン1.4.0_40 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0