diff options
Diffstat (limited to 'app/models/changeset.rb')
-rw-r--r-- | app/models/changeset.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/changeset.rb b/app/models/changeset.rb index 0ed5e1661..3bd26b111 100644 --- a/app/models/changeset.rb +++ b/app/models/changeset.rb @@ -191,6 +191,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 |