UTF-8 encoding and http parameters

前端 未结 2 847
孤城傲影
孤城傲影 2020-12-10 18:12

I am doing a simple ajax call with the YahooUI Javascript library as follows:

YAHOO.util.Connect.setForm(\'myform\');
YAHOO.util.Connect.asyncRequest(\'POST\         


        
2条回答
  •  抹茶落季
    2020-12-10 18:28

    Since you are using a POST query, URIEncoding="UTF-8" is not applicable here. You need to set a filter to tell Tomcat that your request encoding is UTF-8. You may use, for example, a Spring's CharacterEncodingFilter (usage, javadoc). Other implementations of such filters can also be found.

提交回复
热议问题