0
votes

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.

1
well, it's definitely something I'm doing that's causing my problem, everything I can find relating to displaying those sorts of characters boil down to "make sure you're serving the page with UTF-8" as well as "serve the AJAX via UTF-8"... beyond that, font might be an issue, but it's most likely a charset mismatch somewhere.Leo Lansford

1 Answers

0
votes

have you tried to change the file format it self into UTF-8 from the editor .