From d94a464c88cce1414dce8c268ea45ac7a63c4e4b Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Thu, 26 May 2016 08:48:11 +1000 Subject: [PATCH] Does force encoding it stop the bot from crashing? --- bot.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.rb b/bot.rb index af7dd6c..4608ad6 100644 --- a/bot.rb +++ b/bot.rb @@ -393,7 +393,7 @@ def log(sender, channel, message, type='message') channel = Channel.create!(:name => name) if channel.nil? person = person(sender[:nick]) channel.messages.create!(:person => person, - :text => message, + :text => message.force_encoding('utf-8'), :type => type, :hidden => channel.hidden) end