@@ -25,11 +25,7 module Redmine | |||
|
25 | 25 | str = str.encode("UTF-8", :invalid => :replace, |
|
26 | 26 | :undef => :replace, :replace => '?') |
|
27 | 27 | else |
|
28 | str.force_encoding("UTF-8") | |
|
29 | if ! str.valid_encoding? | |
|
30 | str = str.encode("US-ASCII", :invalid => :replace, | |
|
31 | :undef => :replace, :replace => '?').encode("UTF-8") | |
|
32 | end | |
|
28 | str = replace_invalid_utf8(str) | |
|
33 | 29 | end |
|
34 | 30 | str |
|
35 | 31 | end |
General Comments 0
You need to be logged in to leave comments.
Login now