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

show me the page don't work on remote pages with non utf-8 sites #12

Open
petRUShka opened this issue Dec 22, 2010 · 3 comments
Open

show me the page don't work on remote pages with non utf-8 sites #12

petRUShka opened this issue Dec 22, 2010 · 3 comments

Comments

@petRUShka
Copy link
Contributor

Failed with such error:

And show me the page                                                                                         # features/step_definitions/web_steps.rb:217
  "\xD0" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
  ./features/step_definitions/web_steps.rb:218:in `/^show me the page$/'
  features/test_acquiring.feature:59:in `And show me the page'

Ruby 1.9, Rails 3

P.S. Sorry for long answer of previous ticket

@jeroenvandijk
Copy link
Collaborator

Hmmm, this is a hard one. Is it possible for you to put the file that is requested in a gist?

And out of curiosity, which service are you testing? You're own app or a third party service like facebook?

Jeroen

@petRUShka
Copy link
Contributor Author

GIST: https://gist.github.com/78b98b57ad10e42cac90

Unfortunately, this is not my service :( It's acquiring integration with bank.

@eliotsykes
Copy link

In case this helps, I just ran into the same error when downloading the content of web pages and writing them to disk. At the point where the error was happening, forcing the encoding to UTF-8 fixed it:

dodgy_str.force_encoding('UTF-8')

Where dodgy_str is the string which can have dodgy characters in it.

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

3 participants