Skip to main content
Submitted by Xenoveritas on
Topics

While looking through some JSPs, I noticed something:

<%@ page language="java"
  contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%>

<html>
<head>
<meta http-equiv="Content-Type"
  content="text/html; charset=ISO-8859-1">

I've highlighted the important parts. The web server is set to tell the browser that the page is encoded in UTF-8. The page itself, on the other hand, tells the browser it's ISO-8859-1.

Thankfully this had been fixed at some point, so you can tell which original file was used for the copy-paste depending on what the charset is in the <meta> element.

And I know it's my fault. Eclipse has it in its default JSP template and I never bothered removing it, so it got copy-pasted all over the place.