[ https://issues.apache.org/jira/browse/HTTPCORE-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15461572#comment-15461572 ]
Paul Draper commented on HTTPCORE-431: -------------------------------------- [~olegk], the Http Components project does include default encodings for common text formats. When I issue a request using ContentType.APPLICATION_JSON, the entity is UTF-8 encoded. But when a receive a response for the same MIME type, the entity is decoded with ISO-8859-1. If content detection is out of scope, could we at least have application/json entities decoded in UTF-8 by default? In fact, this was the original change I was going to recommend. > Correct character encoding default for application/json > ------------------------------------------------------- > > Key: HTTPCORE-431 > URL: https://issues.apache.org/jira/browse/HTTPCORE-431 > Project: HttpComponents HttpCore > Issue Type: Improvement > Components: HttpCore > Reporter: Paul Draper > Priority: Minor > > RFC 4627 and RFC 7159 require that parsers auto-detect the encoding of > application/json. UTF-8 is the suggested default, though it's possible to > detect the encoding of valid JSON unambiguously. > Currently, EntityUtils.toString defaults to ISO-8859-1 (the default for text > formats without a charset parameter). > Given how common application/json is, it would be great for > EntityUtils.toString to use the correct encoding. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org