diff options
author | Matthias H <apoc@sixserv.org> | 2014-02-21 20:36:43 +0100 |
---|---|---|
committer | Matthias H <apoc@sixserv.org> | 2014-02-21 20:36:43 +0100 |
commit | 8830f3c7bea6b885bb46cd7682b623f7e04333a8 (patch) | |
tree | 069ba1720492a501a44dc60ffd08bceed5021616 /lib | |
parent | 352b7d4551ba0a693b706594866cb2aaeb7a94ac (diff) |
[unicode] fix to ignore invalid-unicode
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbot/core/unicode.rb | 1 |
1 files changed, 1 insertions, 0 deletions
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) |