我使用 freemarker 作为 hippo cms 的模板引擎。我非常关注http://www.onehippo.org/library/concepts/web-application/enabling-freemarker-template-support.html 不幸的是,所有表单都存在编码问题。
关于使用 Spring MVC 时如何在 Freemarker 视图中设置内容类型?我再次检查了我的 utf-8 配置。德语变音符号在请求参数中仍然显示为乱码(在 spring CharacterEncodingFilter 中调试)。
将表单的字符集更改为以下作品。
<form action="${actionLink}" method="post" accept-charset="ISO-8859-1">...</form>
这意味着我猜河马中的某些东西仍然配置为使用 ISO-8859-1。