X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=lib%2Frbot%2Fcore%2Funicode.rb;h=02638bbd3141235e6909012fb56191d9d545bdd1;hb=HEAD;hp=b6471472a89ec9fc5861feabe15d56070c717e5d;hpb=fe6ae0ecaf02182ac5404e7ace3c24b96a12ee9a;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git 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)