summaryrefslogtreecommitdiffstats
path: root/app/models/changeset.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-04-11 13:55:30 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-04-11 13:55:30 +0000
commit5163904a3a8550c33257cadc2966378378a79776 (patch)
treecde561ca45a798dcb5e353cf0eb83591125bf014 /app/models/changeset.rb
parent9306f3ea6c4fca4f72117e5a5676f19f230772e8 (diff)
downloadredmine-5163904a3a8550c33257cadc2966378378a79776.tar.gz
redmine-5163904a3a8550c33257cadc2966378378a79776.zip
Fixed: Update of Subversion changesets broken by r3466 under Solaris (#5255).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3635 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/changeset.rb')
-rw-r--r--app/models/changeset.rb7
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