I'm developing a website with Sinatra, a Ruby framework, and I have a cookie that gets a number from the database, this way:
cookies[:id] = database.execute "SELECT Id FROM Users WHERE Username=?", params[:username]
The database returns a value like this: , which is automatically encoded as %5B1%5D. According to what I've read, it is an URL encoding and it's possible to decode it with CGI. But is there any way to create a cookie without such encoding? I need a human readable one.