@@ -11,6 +11,13 module Redmine | |||
|
11 | 11 | str = str.encode("US-ASCII", :invalid => :replace, |
|
12 | 12 | :undef => :replace, :replace => '?').encode("UTF-8") |
|
13 | 13 | end |
|
14 | elsif RUBY_PLATFORM == 'java' | |
|
15 | begin | |
|
16 | ic = Iconv.new('UTF-8', 'UTF-8') | |
|
17 | str = ic.iconv(str) | |
|
18 | rescue | |
|
19 | str = str.gsub(%r{[^\r\n\t\x20-\x7e]}, '?') | |
|
20 | end | |
|
14 | 21 | else |
|
15 | 22 | ic = Iconv.new('UTF-8', 'UTF-8') |
|
16 | 23 | txtar = "" |
General Comments 0
You need to be logged in to leave comments.
Login now