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