-
Notifications
You must be signed in to change notification settings - Fork 38.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate MediaType.APPLICATION_JSON_UTF8 in favor of APPLICATION_JSON #22788
Comments
Indeed, the related Chrome bug discussed in #18178 is fixed since September 2017, and I have been able to validate that UTF-8 characters are now rendered correctly with |
This commit deprecates MediaType.APPLICATION_JSON_UTF8 and MediaType.APPLICATION_PROBLEM_JSON_UTF8 in favor of MediaType.APPLICATION_JSON and MediaType.APPLICATION_PROBLEM_JSON since UTF-8 encoding is now handled correctly by most browsers (related bug has been fixed in Chrome since September 2017). Closes spring-projectsgh-22788
It is a shame, but Safari still has this bug so we should decide what to do ... |
I have created https://bugs.webkit.org/show_bug.cgi?id=197369 on Safari bugtracker, let's see what is their feedback. |
The Safari bug is only impacting the display in the main frame, not via |
FWIW, I believe the same way true for the matching bugs in Chromium and Firefox. |
This change is a follow-up to the ones done as part of spring-projectsgh-22788. Closes spring-projectsgh-22954
Solve test error by removing the charset in the content type validation as the default value has been changed in Spring Boot 2.2. See gh-22788 (spring-projects/spring-framework#22788)
In the newest versions of Spring Framework, after a change[1] to align it with the RFC8259[2], the character encoding is no longer set to UTF-8 for responses with `application/json` content-type. Tomcat's `Response#getCharacterEncoding()` returns ISO-8895-1 if it is not set explicitly. This fix makes a `JsonResponseWrapper` use UTF-8 by default, instead of getting charset from the wrapped `Response` instance which could have been not set. [1]: spring-projects/spring-framework#22788 [2]: https://tools.ietf.org/html/rfc8259#section-11
In the newest versions of Spring Framework, after a change[1] to align it with the RFC8259[2], the character encoding is no longer set to UTF-8 for responses with `application/json` content-type. Tomcat's `Response#getCharacterEncoding()` returns ISO-8895-1 if it is not set explicitly. This fix makes a `JsonResponseWrapper` use UTF-8 by default, instead of getting charset from the wrapped `Response` instance which could have been not set. [1]: spring-projects/spring-framework#22788 [2]: https://tools.ietf.org/html/rfc8259#section-11
In the newest versions of Spring Framework, after a change[1] to align it with the RFC8259[2], the character encoding is no longer set to UTF-8 for responses with `application/json` content-type. This fix makes a `JsonResponseWrapper` use UTF-8 by default, instead of getting charset from the wrapped `Response` instance which could have been not set and so it returns default ISO-8895-1. [1]: spring-projects/spring-framework#22788 [2]: https://tools.ietf.org/html/rfc8259#section-11
In the newest versions of Spring Framework, after a change[1] to align it with the RFC8259[2], the character encoding is no longer set to UTF-8 for responses with `application/json` content-type. This fix makes a `JsonResponseWrapper` use UTF-8 by default, instead of getting charset from the wrapped `Response` instance which could have been not set and so it returns default ISO-8895-1. [1]: spring-projects/spring-framework#22788 [2]: https://tools.ietf.org/html/rfc8259#section-11
In the newest versions of Spring Framework, after a change[1] to align it with the RFC8259[2], the character encoding is no longer set to UTF-8 for responses with `application/json` content-type. This fix makes a `JsonResponseWrapper` use UTF-8 by default, instead of getting charset from the wrapped `Response` instance which could have been not set and so it returns default ISO-8895-1. [1]: spring-projects/spring-framework#22788 [2]: https://tools.ietf.org/html/rfc8259#section-11
In the newest versions of Spring Framework, after a change[1] to align it with the RFC8259[2], the character encoding is no longer set to UTF-8 for responses with `application/json` content-type. This fix makes a `JsonResponseWrapper` use UTF-8 by default, instead of getting charset from the wrapped `Response` instance which could have been not set and so it returns default ISO-8895-1. [1]: spring-projects/spring-framework#22788 [2]: https://tools.ietf.org/html/rfc8259#section-11
In spring-framework/spring-web/src/main/java/org/springframework/http/MediaType.java:
So it would be best to clarify the text and deprecate the constant.
The text was updated successfully, but these errors were encountered: