Merged r3635 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3657 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
cd15eb77d9
commit
5ef8e8d45f
1 file changed
+6
-1
@@ -182,6 +182,11 @@ class Changeset < ActiveRecord::Base
|
||||
end
|
||||
end
|
||||
# removes invalid UTF8 sequences
|
||||
Iconv.conv('UTF-8//IGNORE', 'UTF-8', str + ' ')[0..-3]
|
||||
begin
|
||||
Iconv.conv('UTF-8//IGNORE', 'UTF-8', str + ' ')[0..-3]
|
||||
rescue Iconv::InvalidEncoding
|
||||
# "UTF-8//IGNORE" is not supported on some OS
|
||||
str
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user