scm: use upcase to compare encoding name "UTF-8" in log converting.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5375 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-04-09 23:21:41 +00:00
parent f31df6c02f
commit cae3fcce54
1 changed files with 1 additions and 1 deletions

View File

@ -263,7 +263,7 @@ class Changeset < ActiveRecord::Base
end end
enc = encoding.blank? ? "UTF-8" : encoding enc = encoding.blank? ? "UTF-8" : encoding
if str.respond_to?(:force_encoding) if str.respond_to?(:force_encoding)
if enc != "UTF-8" if enc.upcase != "UTF-8"
str.force_encoding(enc) str.force_encoding(enc)
str = str.encode("UTF-8", :invalid => :replace, str = str.encode("UTF-8", :invalid => :replace,
:undef => :replace, :replace => '?') :undef => :replace, :replace => '?')