diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/changeset.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/changeset.rb b/app/models/changeset.rb index 60ab87864..27565c6de 100644 --- a/app/models/changeset.rb +++ b/app/models/changeset.rb @@ -272,6 +272,13 @@ class Changeset < ActiveRecord::Base :undef => :replace, :replace => '?').encode("UTF-8") end end + elsif RUBY_PLATFORM == 'java' + begin + ic = Iconv.new('UTF-8', enc) + str = ic.iconv(str) + rescue + str = str.gsub(%r{[^\r\n\t\x20-\x7e]}, '?') + end else ic = Iconv.new('UTF-8', enc) txtar = "" |