Sinatra / Rack fails with non-ascii characters in url
- by Piotr Zolnierek
I am getting Encoding::UndefinedConversionError at /find/Wroclaw
"\xC5" from ASCII-8BIT to UTF-8
For some mysterious reason sinatra is passing the string as ASCII instead of UTF-8 as it should.
I have found some kind of ugly workaround... I don't know why Rack assumes the encoding is ASCII-8BIT ... anyway, a way is to use string.force_encoding("UTF-8")... but doing this for all params is tedious