Skip to content

the default charset incorrect when the content-type is application/json  #1102

Closed
@slggamerTrue

Description

@slggamerTrue

Environment details

  1. HTTP Requests with the "content-type: applications/json" response
  2. OS type and version: All
  3. Java version: All
  4. google-http-client version(s): All

Steps to reproduce

  1. A Server response "content-type: application/json" with some special characters like Chinese.
  2. From the https://tools.ietf.org/html/rfc4627, 3.Encoding "JSON text SHALL be encoded in Unicode. The default encoding is UTF-8."
  3. But in google-http-java-client/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java, it use the charset Charsets.ISO_8859_1.

Thanks!

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions