Tomcat 6 和外来字符(UTF-8 和非 UTF-8 混合)
我在使用 Tomcat 6 的 Web 应用程序中显示外语字符时遇到问题。以前我们使用 Tomcat 5.5,并且没有遇到此问题。为了解决这个问题,我遵循http://wiki.apache.org/tomcat/FAQ/CharacterEncoding #Q8 并对我的网络应用程序进行了相应的更改。现在,Web 应用程序支持 URF-8 编码,并且大多数编码问题都已修复。我现在面临的更大问题是使用 Tomcat 5.5 的应用程序存储在数据库中的旧数据。旧数据在使用 UTF-8 编码的 Web 应用程序上无法正确显示。让 web 应用程序配置 UTF-8 编码并能够显示非 UTF-8 编码的旧数据的最佳方法是什么?
另外,我无法确定以前使用的编码。谢谢。
I have a problem displaying foreign language characters in web app with Tomcat 6. Previously we were using Tomcat 5.5 and we did not face this issue. To fix this issue I followed http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q8 and made changes to my web app accordingly. Now the web app supports URF-8 encoding and most of the issues with encoding are fixed. The bigger problem that I am facing now is with the old data that is stored in the database using the app with Tomcat 5.5. The old data is not displayed correctly on the webapp with UTF-8 encoding. What is the best way to to have the webapp configured with UTF-8 encoding and also to be able to display the old data which are not UTF-8 encoded?
Also, the I am not able to determine what encoding was used previously. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论