From: The Chromag Date: 2010-02-20T03:39:55+09:00 Subject: Re: RTranslate Gem (Open-URI) and Encoding Seebs wrote: > On 2010-02-18, The Chromag wrote: >> I'm using the rtranslate gem (sishen-rtranslate) to handle translating >> some text. It uses open-uri to scrape Google Translate. If I attempt >> to translate text from English to Spanish it outputs some garbage >> characters. > >> Translating the word "where" returns "dónde" instead of "d�nde" > > The amusing part is that the first one looks fine to me. > > I suspect this means that you're getting UTF8 when you expect something > in some particular encoding, so you should be specifying encodings... Where would I specify the encoding to fix this problem? And yes, I just noticed that in a reply it DOES look correct, but when I posted it, it was not. I'm guessing somewhere (other than $KCODE) I need to set it as UTF-8. Thanks. -- Posted via http://www.ruby-forum.com/.