scm: fix JRuby tests fail in unit changeset following test.
* test_invalid_utf8_sequences_in_comments_should_be_replaced_ja_jis * test_invalid_utf8_sequences_in_comments_should_be_replaced_latin1 git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6020 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
f8c0a4da63
commit
8427048d5d
@ -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 = ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user