Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArgumentError: invalid byte sequence in GB2312 on certain words/locales #6

Open
jnevelson opened this issue Nov 3, 2011 · 2 comments

Comments

@jnevelson
Copy link

I found a bug that occurs under very specific circumstances, as far as I can tell.

A TranslateServerIsDown exception is thrown when I try to translate the words "slow" and "fast" (so far those are the only two words I have found to cause this error) from English to Chinese Simplified (locale is zh_cn). Other locales (specifically Chinese Traditional, zh_tw) work fine.

Going through line by line shows that the error in the title is thrown in line 38 when the split(",") method is called. Something about the encoding that is returned from Google, only from those two words and that specific locale, breaks it.

I played around with forcing utf-8 and other encodings, but was not yet able to fix the problem.

@jnevelson
Copy link
Author

I have now found a few other words ("high", "crouch", "speed") that cause this error, but my guess is that this is a problem on Google's side, not a bug with this gem.

@hron84
Copy link
Contributor

hron84 commented Mar 10, 2012

@jnevelson did you tried with UTF-8 too? Error is caused in that encoding too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants