scm: fix log converting error in Ruby 1.9 and add more tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5370 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -256,7 +256,8 @@ class Changeset < ActiveRecord::Base
|
||||
enc = encoding.blank? ? "UTF-8" : encoding
|
||||
if enc != "UTF-8"
|
||||
str.force_encoding(enc)
|
||||
str = str.encode("UTF-8")
|
||||
str = str.encode("UTF-8", :invalid => :replace,
|
||||
:undef => :replace, :replace => '?')
|
||||
end
|
||||
if ! str.valid_encoding?
|
||||
str = str.encode("US-ASCII", :invalid => :replace,
|
||||
|
||||
Reference in New Issue
Block a user