Ruby (not rails) internationalization

I have some web page which contains accented words (in french/italian
etc) which I need to parse/extract and display. But the
internationalization is not being taken into consideration so crazy
characters are being shown. I searched in google for ruby
internationalization but came up with rails internationalization. As you
know that I don't need rails right now (which btw, I have no knowledge
in). I just need to work in plain ruby. I don't know how
internationalization is dealt with in regular ruby. Can someone throw
some light on this?

Thanks.

···

--
Posted via http://www.ruby-forum.com/.

Try use the i18n <http://github.com/svenfuchs/i18n&gt; gem or
r18n<http://github.com/ai/r18n&gt;gem\.

Rafael Mendonça França
Twitter: http://twitter.com/rafaelfranca
Blog: www.rafaelfranca.com.br

···

On Wed, Mar 10, 2010 at 10:23 PM, Amishera Amishera <amishera2007@gmail.com>wrote:

I have some web page which contains accented words (in french/italian
etc) which I need to parse/extract and display. But the
internationalization is not being taken into consideration so crazy
characters are being shown. I searched in google for ruby
internationalization but came up with rails internationalization. As you
know that I don't need rails right now (which btw, I have no knowledge
in). I just need to work in plain ruby. I don't know how
internationalization is dealt with in regular ruby. Can someone throw
some light on this?

Thanks.
--
Posted via http://www.ruby-forum.com/\.

Easiest is to use Ruby 1.9 with Nokogiri for the HTML parsing.
Then all you need to do is converting from the original encoding to
your target encoding.
See also a nice introduction into the world of encodings by JEGII:

···

On Thu, Mar 11, 2010 at 10:23 AM, Amishera Amishera <amishera2007@gmail.com> wrote:

I have some web page which contains accented words (in french/italian
etc) which I need to parse/extract and display. But the
internationalization is not being taken into consideration so crazy
characters are being shown. I searched in google for ruby
internationalization but came up with rails internationalization. As you
know that I don't need rails right now (which btw, I have no knowledge
in). I just need to work in plain ruby. I don't know how
internationalization is dealt with in regular ruby. Can someone throw
some light on this?

--
Michael Fellinger
CTO, The Rubyists, LLC