From 35b38d0adfb6b00827c4552520a316a10b217958 Mon Sep 17 00:00:00 2001 From: Matthias H Date: Fri, 28 Feb 2014 22:53:16 +0100 Subject: [httputil] fix to ignore recoding errors --- lib/rbot/core/utils/httputil.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rbot') diff --git a/lib/rbot/core/utils/httputil.rb b/lib/rbot/core/utils/httputil.rb index 1b4c3526..aba730f9 100644 --- a/lib/rbot/core/utils/httputil.rb +++ b/lib/rbot/core/utils/httputil.rb @@ -72,7 +72,7 @@ module ::Net begin debug "try decoding using #{charset}" str.force_encoding(charset) - tmp = str.encode(Encoding::UTF_8) + tmp = str.encode('UTF-16le', :invalid => :replace, :replace => '').encode('UTF-8') if tmp str = tmp break -- cgit v1.2.3