Postman utf-8 encoding issue when charset=utf-8 is not provided by server

女生的网名这么多〃 提交于 2021-02-10 08:38:16

问题


Spring deprecated APPLICATION_JSON_UTF8 (application/json;charset=UTF-8) annotation as they said:

     /**
     * A String equivalent of {@link MediaType#APPLICATION_JSON_UTF8}.
     * @deprecated as of 5.2 in favor of {@link #APPLICATION_JSON_VALUE}
     * since major browsers like Chrome
     * <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=438464">
     * now comply with the specification</a> and interpret correctly UTF-8 special
     * characters without requiring a {@code charset=UTF-8} parameter.
     */
    @Deprecated
    public static final String APPLICATION_JSON_UTF8_VALUE = "application/json;charset=UTF-8";

When I sent a request to API from Chrome or command line, encoding works correctly. But, Postman is not showing correct response unless I use application/json;charset=UTF-8 for producing.

Is there any way to fix that issue on Postman?


回答1:


this has been solved in newer versions, upgrade if you still encounter the issue



来源:https://stackoverflow.com/questions/59480399/postman-utf-8-encoding-issue-when-charset-utf-8-is-not-provided-by-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!