You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if req.body is set to a unicode string, the framework always encodes it as UTF-8 in the response. For correctness, we should respect alternate encodings when they are specified in the Content-Type header for the response.
The text was updated successfully, but these errors were encountered:
Can you explain this a little more? Would this just be if the content-type is set to text/, then charset is used to decide how to encode the charset? http://www.w3.org/Protocols/rfc1341/7_1_Text.html
I'm going to close this issue since it hasn't really attracted much attention, and it feels like it should be responsibility of the respective media handler. For instance, JSON is standardized to almost always use UTF-8 (or just ASCII by escaping the entities).
resp.text is documented to encode in UTF-8, simple and clear.
For more advanced handling of text as media, see also #2037
Currently, if req.body is set to a unicode string, the framework always encodes it as UTF-8 in the response. For correctness, we should respect alternate encodings when they are specified in the Content-Type header for the response.
The text was updated successfully, but these errors were encountered: