diff options
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/http/upload.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/http/upload.rb b/actionpack/lib/action_dispatch/http/upload.rb index ed6140dac5..a15ad28f16 100644 --- a/actionpack/lib/action_dispatch/http/upload.rb +++ b/actionpack/lib/action_dispatch/http/upload.rb @@ -33,10 +33,9 @@ module ActionDispatch private def encode_filename(filename) - # Encode the filename in the default_external encoding, unless it is nil or we're in 1.8 + # Encode the filename in the utf8 encoding, unless it is nil or we're in 1.8 if "ruby".encoding_aware? && filename - encoding = Encoding.default_external - filename.force_encoding(encoding) + filename.force_encoding("UTF-8").encode! else filename end |