diff options
-rw-r--r-- | app/helpers/repositories_helper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index 50a1ba240..28397c945 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -132,6 +132,10 @@ module RepositoriesHelper # do nothing here and try the next encoding end end + if str.respond_to?(:force_encoding) + str = str.encode("ASCII-8BIT", :invalid => :replace, + :undef => :replace, :replace => '?').encode("UTF-8") + end str end |