Should JSONResponse add "charset=utf-8" to "Content-Type" header? #1791
-
For example, Dart clients as described here will by default use latin1 charset to comply with RFC 2616. Considering that JSONResponse explicitly encodes it's body using utf8 it might be a good idea to let the client know it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The
In other words, I believe that means that no As for the behavior of Dart's |
Beta Was this translation helpful? Give feedback.
The
encoding
content type parameter is defined only fortext
MIME subtypes, but the standard JSON media type is anapplication
subtype,application/json
:charset
as part of the specification for thetext
type;iso-8859-1
only fortext
subtypes (emphasis mine):