ruby (not rails) internationalization

A

Amishera Amishera

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.
 
M

Michael Fellinger

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?

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:
http://blog.grayproductions.net/articles/understanding_m17n
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top