seejohnrun/console_tweet — Issue #5: A bug in UTF8 string length
Author: jmjeong
Created: 2011-12-01 14:11:06+00:00
State: open

Hi,

I am a newbie in Ruby language.

According to ruby string manual, ruby string does not support utf-8 string.

In lib/console_tweet/cli.rb 86 line:

return failtown("Tweet is too long!") if tweet_text.size > 140

This line works good for english string, but is not good for UTF-8 string, especially for CJK language.
Twitter supports UTF-8 encoding for tweet, so length check routine should admire UTF-8 encoding.