I'm trying to display a character stored in a database that is the unicode character \u0096. Because of a strange windows-vs-web-browser thing this is a control character in the unicode standard, but web-pages will display it as an En Dash. See @AlanMoore's answer on Some UTF-8 characters do not show up on browser.
I have the following jsp file. I want to display the \u0096 character as an En Dash(A feat that other front-end solutions can accomplish).
<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ page session="false" trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!doctype html>
<html>
<c:set var="control" scope="request" value= "b"/>
<c:set var="endash" scope="request" value="a"/>
<% request.setAttribute("control", "\u0096");%>
<% request.setAttribute("endash", "\u2013");%>
Match? 0096: <c:out value="${control}"/> 2013: <c:out value="${endash}"/>
The output that I get is
Match? 0096: 2013: –
What I want is
Match? 0096: – 2013: –