playframework/Play20 — pull request #527 by jroper (2012-11-09 02:11:33+00:00)
Title: [#474] Improved Java WS API charset handling

* In JSON responses, let Jackson automatically detect the charset
* In String responses, default to ISO-8859-1, as required by the HTTP/1.1 spec, if no charset is specified and content type is a sub type of text, otherwise default to UTF-8 if no charset is specified
* In String request bodies, encode using the user specified charset from the Content-Type header, or if none found, or if none specified in the header, default to utf-8 and modify the header to indicate this
* Provide put() and post() methods for JSON, that set the content type to application/json; charset=utf-8
* Provide setContentType convenience method