ChiliProject is not maintained anymore. Please be advised that there will be no more updates.
We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.
Japanese attachement filename is broken on Japanese Windows Ruby 1.9 (Bug #856)
Description
History
Updated by Toshi MARUYAMA at 2012-02-01 03:23 pm
Sorry, subject "attachement" is typo.
Updated by Pavel Nakonechny at 2012-02-14 07:12 am
In
app/models/attachment.rb
replace
@filename = just_filename.gsub(/[^\w\.\-]/,'_')
with
@filename = just_filename.gsub(/[\/\?\%\*\:\|\"\'<>]+/, '_')
Updated by Toshi MARUYAMA at 2012-03-17 02:48 am
It seems following lines fix this problem.
1 if o.respond_to?(:original_filename) 2 o.original_filename.force_encoding(Encoding::UTF_8) 3 raise ActionController::InvalidByteSequenceErrorFromParams unless o.original_filename.valid_encoding? 4 end
This code is from http://developer.uservoice.com/entries/how-to-upgrade-a-rails-2.3.14-app-to-ruby-1.9.3/
Updated by rwing rwing at 2012-12-11 08:08 am
Toshi MARUYAMA wrote:
It seems following lines fix this problem.
[...]
This code is from http://developer.uservoice.com/entries/how-to-upgrade-a-rails-2.3.14-app-to-ruby-1.9.3/
Sorry, I'm ruby newbie, which file I need to modify?