Commits
Morten Kjetland authored b8daa4bd740
[#541] Play is no longer hardcoded to use utf-8 when communicating with client.
Http.Request now uses encoding specified in HTTP-Request or fallback to Play.defaultWebEncoding which default is utf-8.
Http.Response can have different encoding for each response. It uses Play.defaultWebEncoding (default to utf-8) as default encoding for each response.
You can modify the encoding for a specific request like this: Http.Response.current().encoding = "iso-8859-1"
play.libs.WS is now fully encoding aware: default encoding for all WS-operations is now Play.defaultWebEncoding which default is set to utf-8.
If developer want to use WS with other than default encoding, this can be done like this:
WS.withEncoding("iso-8859-1").url(someUrl).get().getString()
Play.defaultWebEncoding can be configured in application.conf with the property 'application.web_encoding'