summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias H <apoc@sixserv.org>2014-02-28 22:53:16 +0100
committerMatthias H <apoc@sixserv.org>2014-02-28 22:53:16 +0100
commit35b38d0adfb6b00827c4552520a316a10b217958 (patch)
tree4718f8372a23a78ea7b3630e080eaf7a1dc05aa9
parent41a24fd35c29f48194c5bc034972d9859267d2b5 (diff)
[httputil] fix to ignore recoding errors
-rw-r--r--lib/rbot/core/utils/httputil.rb2
1 files changed, 1 insertions, 1 deletions
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