我正在使用Spring MVC开发REST API。我有自动创建的复选框。复选框的值以韩语显示在网页上,当我选中一个复选框时,它会返回一个无法读取的字符串。我已经在我的jsp页面中添加了<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>标签,并在控件中注释了我的函数,就像这样的RequestMapping(value = "/filterSubmit", method = RequestMethod.POST, produces = "application/json;charset=UTF-8" )。我还添加了URIEncoding="UTF-8"到tomcat server.xml <Connector URIEncoding="UTF-8" connectionTimeout="20000" port="8081" protocol="HTTP/1.1" redirectPort="8443"/>中,我仍然无法读取选定的值吗?
发布于 2021-05-23 02:52:03
据我所知,CJK (中文/韩文/日文)不使用UTF-8编码。所以你的问题可能是编码的问题。尝试其他一些pageEncoding
参考资料:https://en.m.wikipedia.org/wiki/Korean_language_and_computers
https://stackoverflow.com/questions/67651708
复制相似问题