From 8830f3c7bea6b885bb46cd7682b623f7e04333a8 Mon Sep 17 00:00:00 2001 From: Matthias H Date: Fri, 21 Feb 2014 20:36:43 +0100 Subject: [unicode] fix to ignore invalid-unicode --- lib/rbot/core/unicode.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/rbot') diff --git a/lib/rbot/core/unicode.rb b/lib/rbot/core/unicode.rb index b6471472..02638bbd 100644 --- a/lib/rbot/core/unicode.rb +++ b/lib/rbot/core/unicode.rb @@ -22,6 +22,7 @@ class UnicodePlugin < CoreBotModule def in(data) data.force_encoding @charset if data + data.encode('UTF-16le', :invalid => :replace, :replace => '').encode('UTF-8') end def out(data) -- cgit v1.2.3