1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-19 15:01:14 +00:00

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:
Jean-Philippe Lang 2010-04-11 14:53:54 +00:00
parent cd15eb77d9
commit 5ef8e8d45f

View File

@ -182,6 +182,11 @@ class Changeset < ActiveRecord::Base
end end
end end
# removes invalid UTF8 sequences # 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
end end