Actually, I can make it work like this -

require 'rubygems'
require 'lib/extractor'
require 'lib/regex'

include Twitter::Extractor
usernames = extract_mentioned_screen_names("Mentioning @twitter and @jack")
puts usernames
# usernames = ["twitter", "jack"]

But I want to use classes like this -

require 'rubygems'
require 'unicode'
$KCODE = 'KU'
require 'twitter-text'

class MyClass
    include Twitter::Extractor
    usernames = extract_mentioned_screen_names("Mentioning @twitter and @jack")
    puts usernames
end

m = MyClass.new



On Sun, Apr 11, 2010 at 5:37 PM, Patrick <[email protected]> wrote:
>
> The twitter open source code looks simple and fun -
>
> http://github.com/mzsanford/twitter-text-rb
>
> However, it seems I need to install unicode support.  On Linux, I was
> able to, though on Windows 7, I don't have nmake (don't have C++).
> Anyways, it still complains about setting $KCODE to utf8 or u (or
> using the -KU command line switch).  I tried both but can't seem to
> make it work.  Which gem do I need for unicode, and how can I set it
> programmatically?
>
> I tried ideas like this:
>
> require 'rubygems'
> require 'unicode'
> $KCODE = 'KU'
>
>
> --
> To unsubscribe, reply using "remove me" as the subject.
>

Reply via email to