diff --git a/plugins/community_hub/tweeter_stream/lib/twurl/request_controller.rb b/plugins/community_hub/tweeter_stream/lib/twurl/request_controller.rb index f761183..d6b82a4 100755 --- a/plugins/community_hub/tweeter_stream/lib/twurl/request_controller.rb +++ b/plugins/community_hub/tweeter_stream/lib/twurl/request_controller.rb @@ -1,4 +1,5 @@ require "json" +require 'iconv' module Twurl class RequestController < AbstractCommandController @@ -18,10 +19,12 @@ module Twurl #unless chunk.to_i.length = 0 begin parsed = JSON.parse(chunk) - print "@#{parsed["user"]["name"]} said: #{parsed["text"]} \n" + ic = Iconv.new('UTF-8//IGNORE', 'UTF-8') + comment_text = ic.iconv("@#{parsed["user"]["name"]} " + _('said:') + " #{parsed["text"]}" + ' ')[0..-2] + print "#{comment_text}\n" comment = Comment.new comment.source_id = Stream.page.id - comment.body = parsed["text"] + comment.body = comment_text comment.author_id = Stream.author_id comment.save! rescue -- libgit2 0.21.2