Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

UTF-8 encoding problems  RSS feed

Posts: 11962
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I just joined a relatively large project, which has problems with some pages not working correctly in terms of internationalization -- characters outside of ISO-8859-1 aren't displayed correctly in the browser.

Now, I already checked that none of the files includes any "magic characters" except in a couple of @author tags, which shouldn't end up in the generated servlet anyway. I also compared a working page with a non-working page and the only difference I could find was that the non-working page included a <%@ page pageEncoding="utf-8" %> somewhere along the way (there's a lot of nested, static include directives with the top-level JSP including another JSP including another JSP including another, and so on...).

Any tips regarding where should I look for the cause of this problem?
I am going to try (on monday) to add an explicit <%@ page pageEncoding="utf-8" %> and <%@ page contentType="text/html;charset=utf-8" %> on top of every file involved and see whether that helps. In the meanwhile, I'd really appreciate it if you guys could share any similar problems you've solved in the past.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!