[ https://issues.apache.org/jira/browse/HTTPCLIENT-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17554190#comment-17554190 ]
Oleg Kalnichevski commented on HTTPCLIENT-2224: ----------------------------------------------- [~javedbhayla] I am not sure [HTTPCLIENT-2159|https://issues.apache.org/jira/projects/HTTPCLIENT/issues/HTTPCLIENT-2159] is valid bit I leave it up to [~michael-o] to propose a fix. I am not sure what you expect us to do here. Use a better message consumer optimized for processing of JSON messages. Simple messages are intended for trivial text message exchanges only. https://hc.apache.org/httpcomponents-client-5.1.x/migration-guide/index.html Oleg > US_ASCII used instead of charset configuration in CharCodingConfig > ------------------------------------------------------------------ > > Key: HTTPCLIENT-2224 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2224 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient (async) > Affects Versions: 5.1.3 > Environment: Running on MacOS, EC2 > Reporter: Javed Bhayla > Priority: Major > > Issue: “supplémentaires sur l'état relative à” shows up as “suppl��mentaires > sur l'��tat relative ��” in the JSON response > I have configured the async client to use UTF_8 using: > CloseableHttpAsyncClient client = HttpAsyncClients.custom() > .setCharCodingConfig(CharCodingConfig.custom().setCharset(UTF_8).build()) > .build() > Making a request and calling “response.getBodyText()” results in US_ASCII > being used instead of UTF_8 because the server returns the header > “Content-Type: application/json” without the charset. > If the server returns "Content-Type: application/json;charset=utf-8", then > UTF-8 is used as expected. > Should the CharCodingConfig setting be used as the default instead of > US_ASCII in SimpleBody? -- This message was sent by Atlassian Jira (v8.20.7#820007) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org