Using Ruby 2.4.1 and Sinatra 2.0.0.
Using the following get invocation:
get '/entries/:slug' do |slug|
logger.info slug.encoding
end
Making a GET request to /entries/foo will log the encoding as ASCII-8BIT.
Why is the encoding not UTF-8? This plays havoc with sqlite3 at the very least, which interprets ASCII-8BIT strings as BLOB data instead of string data.
Using Ruby 2.4.1 and Sinatra 2.0.0.
Using the following
getinvocation:Making a GET request to
/entries/foowill log the encoding asASCII-8BIT.Why is the encoding not UTF-8? This plays havoc with sqlite3 at the very least, which interprets
ASCII-8BITstrings asBLOBdata instead of string data.