From 24f1a6e9fc0bbe42a29a7880f57732bc5ad4ae34 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 18 Nov 2014 01:14:52 -0600 Subject: Run test-bot logs through iconv on Ruby 1.8 --- Library/Homebrew/cmd/test-bot.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Library') diff --git a/Library/Homebrew/cmd/test-bot.rb b/Library/Homebrew/cmd/test-bot.rb index 93f3e0714..f18838f1a 100644 --- a/Library/Homebrew/cmd/test-bot.rb +++ b/Library/Homebrew/cmd/test-bot.rb @@ -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 -- cgit v1.2.3