summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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