From: Jean-Philippe Lang Date: Sun, 11 Apr 2010 14:53:54 +0000 (+0000) Subject: Merged r3635 from trunk. X-Git-Tag: 0.9.4~15 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5ef8e8d45f152d03139b6d85e0c6805295157b78;p=redmine.git Merged r3635 from trunk. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3657 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/changeset.rb b/app/models/changeset.rb index 4f6300381..7e369ed35 100644 --- a/app/models/changeset.rb +++ b/app/models/changeset.rb @@ -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