I cannot figure out what the issue is since I have utf-8 set as the character set. The jsp source code for the section where the special characters are is as follow:
but it gets rendered as
Note that the – is replaced with â€“
Any thoughts as to what the issue could be?
A snippet from there:
Change all your JSPs to include charset name in their contentType.
For example, use <%@page contentType="text/html; charset=UTF-8" %> for the usual JSP pages and <jsp:directive.page contentType="text/html; charset=UTF-8" /> for the pages in XML syntax (aka JSP Documents).
Dave Tolls wrote:What rendering are you talking about...on the client browser?
Another question would be, what character is that?
Do you know the UTF-8 codepoint for it?
It did not display properly on the client browser. The character is a long dash, but other characters such as the copyright symbol would not be displayed properly.
The link from Jaikiran helped fix the problem, which was probably just the server using the default encoding. I did put <meta charset="utf-8" /> in the head of the html, but obviously would not tell the server what the encoding of the jsp was, so adding <%@ page contentType="text/html; charset=UTF-8" %> fixed the issue.