Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在速度模板文件中有非 ascii 字符。并且在处理时它们是乱码。
文件以 UTF-8 编码保存,响应头 contentType 也设置为text/html;charset=UTF-8.
text/html;charset=UTF-8
还有什么可以做的?
好的,所以解决方案是设置以下速度属性(Spring 的 bean def 的一部分):
<entry key="input.encoding" value="UTF-8"/> <entry key="output.encoding" value="UTF-8"/>