]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/core/unicode.rb
readme: added build status image
[user/henk/code/ruby/rbot.git] / lib / rbot / core / unicode.rb
index b6471472a89ec9fc5861feabe15d56070c717e5d..02638bbd3141235e6909012fb56191d9d545bdd1 100644 (file)
@@ -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)