Ruby 1.8 displays non-ascii characters in the shell using octal escape sequences. \302\277 is ¿, \303\263 is ó and so forth. It should be fine to work with (eg, saving to a database or displaying in a template) as long as you know the encoding. I just glanced at the code, but it looks like it just takes whatever the Google Translate API gives it, which I'm guessing is UTF-8.
Comments
What's causing this?
Ruby 1.8 displays non-ascii characters in the shell using octal escape sequences. \302\277 is ¿, \303\263 is ó and so forth. It should be fine to work with (eg, saving to a database or displaying in a template) as long as you know the encoding. I just glanced at the code, but it looks like it just takes whatever the Google Translate API gives it, which I'm guessing is UTF-8.
Listed under "Roadmap" in the readme is the following:
Investigate Unicode support for Ruby 1.8. to_lang has only been tested with 1.9.
Do you have a copy of 1.9 to test with?
Ah, yes. Much better:
ThanksAccents and special chars, I think it is trying to output "¿Dónde está el baño?"