Run test-bot logs through iconv on Ruby 1.8

This commit is contained in:
Jack Nagel 2014-11-18 01:14:52 -06:00
parent a9e34b0ee2
commit 24f1a6e9fc

View File

@ -149,6 +149,10 @@ module Homebrew
str.encode!(Encoding::UTF_16, :invalid => :replace)
str.encode!(Encoding::UTF_8)
end
elsif require "iconv"
def fix_encoding(str)
Iconv.conv("UTF-8//IGNORE", "UTF-8", str)
end
else
def fix_encoding(str)
str