I'm trying to display the Unicode replacement character, but some combination of font and page encoding seems to be causing the character to show up invisibly in the browser. I can highlight the browser content and copy-paste it into a text editor and see the question-in-a-box glyph, so the character is there, but the browser displays no glyph.
I'm processing a text file with a java.nio.charset.CharsetDecoder
object (using the "REPLACE" option for onUnmappable
), so it should process all inputs and if there are unmappable outputs I should see the replacement character (which is being left as the default).
I'm displaying this content in a jsp which is tagged as utf-8 like this:
<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8" %>
And also like this:
meta charset='utf-8'
(first element in the head)
Initially, my page has a font-family
CSS setting of 'Courier New', but I've tried various fonts after looking at this page. Something is making the Unicode replacement glyph invisible in the rendered page.