application/json default charset is not UTF-8 when parsing request
See original GitHub issueThis is a follow up to #80. Apparently, responses were fixed, but there are still issues with the requests.
Request with Content-Type: application/json
is decoded not as UTF-8, while request with Content-Type: application/json; charset=utf-8
is decoded correctly. Both has to behave the same and be decoded as UTF-8.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:15
- Comments:30 (7 by maintainers)
Top Results From Across the Web
What does "Content-type: application/json; charset=utf-8 ...
JSON text SHALL be encoded in Unicode. The default encoding is UTF-8. Since the first two characters of a JSON text will always...
Read more >[play 2.6] charset removed with application/json content-type
When sending a request with the content type "text/plain;charset=UTF-8", request. ... to one of our application where we do not use the default...
Read more >1266023 - JSON's default charset should be UTF-8
The server-side workaround is to get the web server to provide "Content-Type: application/json; charset=utf-8" in its responses instead of "Content-Type: ...
Read more >Json – Default encoding of HTTP POST request with JSON body
JSON spec says that "JSON text SHALL be encoded in Unicode. The default encoding is UTF-8." HTTP spec says that "When no explicit...
Read more >JSON to JSONX is not converting all UTF-8 characters - IBM
based on my test scenarios it is encode ISO-8859 chars not UTF-8 all characters, try with any payload with json element value other...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Use this function if you just want to “have it work”:
@cy6erGn0m Maybe you want to change the default implementation of
receiveText
to the implementation ofreceiveTextWithCorrectEncoding()
?I have run into this problem as well. The
receiveTextWithCorrectEncoding()
work-around solved it for now, but it seems like it is still an issue.