Hello guys,

I'm facing to an encoding issue with Sinatra (maybe Rack related).

Example:
# Client side
curl -XPOST -H 'Content-type: text/plain; charset=UTF-8' localhost:4567 -d
'hllo'

# Server side
body = request.body.read
puts body # "h\xC3\xA9llo"
puts body.encoding # ASCII-8BIT

The body encoding format is always ASCII-8BIT even with a charset specified
to UTF-8. Do you know if this is a normal behavior ?

After some digging, i found that issue about URI encoding
https://github.com/rack/rack/issues/732 but nothing about the body format.

Best regards,
-- 
Sbastien Puyet
(supressed text/html)
Unsubscribe: <mailto:ruby-talk-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>