[英]Java Tomcat UTF-8 issue
I can't make UTF-8 work in Tomcat. 我无法使UTF-8在Tomcat中工作。 I've already done the following configurations:
我已经完成以下配置:
When I call my webapp url in the browser or postman I can see Content-Type →text/html;charset=UTF-8 . 当我在浏览器或邮递员中调用webapp URL时,可以看到Content-Type→text / html; charset = UTF-8 。 But the page is rendered with wrong encoding.
但是页面呈现的编码错误。 And when I open the deployed webapp in Tomcat folder the html files are with the correct encoding too.
当我在Tomcat文件夹中打开已部署的webapp时,html文件的编码也正确。 I really don't know what to do.
我真的不知道该怎么办。
I am using Angular, Spring, Jersey, Spring Security and Tomcat. 我正在使用Angular,Spring,Jersey,Spring Security和Tomcat。
Thanks. 谢谢。
בס"ד בס"ד
In servlet data response?? 在servlet数据响应中? you can try:
你可以试试:
response.setCharcterEncoding(("utf-8"));
Good luck. 祝好运。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.