views:

61

answers:

1

I am trying to track a set of keywords from Twitter by using the Streaming API (can't post the link here because of spam limitations: google twitter streaming API).

I am doing this inside Ruby, using the TweetStream gem: http://bit.ly/cODAWI

The problem I have is that I want to track keywords that contain some unicode/UTF-8 characters. For instance:

require 'rubygems'
require 'tweetstream'
TweetStream::Client.new("my_user_name", "my_password").track("é") do |s|
 puts s.text
end

(you can try it out, provided you installed the tweetstream and json gems)

This piece of code does not print anything, while replacing "é" with "e" outputs a bunch of tweets continuously.

I did not find any reliable documentation about Unicode in Ruby, so I have no idea where the problem comes from.

Thanks for your help!

A: 

A good part of the answer might be found here: http://groups.google.com/group/twitter4j/browse_thread/thread/49515c9d1b90fa47?pli=1

In short: Twitter Streaming does not support UTF-8 character tracking.

Régis B.