rchatley/extreme_startup — pull request #25 by seblm (2012-08-13 20:35:00+00:00)
Title: handle case where player submit a name with non ASCII characters

When I submit into the game with name `Sébastian`, then at first question server shut down with given error :

GET: http://127.0.0.1:8080?q=7c528a60:%20what%20is%20your%20name
lib/extreme_startup/quiz_master.rb:93:in `start': incompatible character encodings: UTF-8 and ASCII-8BIT (Encoding::CompatibilityError)
from lib/extreme_startup/web_server.rb:133:in `block (2 levels) in '

After investigation, it appears that player's name readen from HTTP params in Sinatra class is `UTF-8` in this case.
Furthermore answer retrieved by HTTParty.get(url) and converted by `.to_s()` is `ASCII-8BIT` encoded.
Now concatenating an `UTF-8` encoded string with an `ASCII-8BIT` encoded string is considered not safer by Ruby.

I propose to force each answer to be UTF-8 encoded in order to solve this issue.