Hi,
I want to display some Unicode Entities (arond U+2650, some graphical symbols) but I can’t get them to display in the browser (tested FF, Safari)
what I have:
.html file (utf-8 encoded)
.js file (utf-8 encoded)
insert:
now what happens is that the symbol is converted into an Unicode char (I can text select one single char) and inserted into the HTML, but there is no visibility (besides that I can select it...).
ex. "♜"
strangely enough, if I select and copy-paste the text into my editor, I get the character as if nothing had happened. ah, yes, and of course the ACSII and ISO range values all work (e.g. 252).
if I use
I get displayed "&#9820 ;" i.e. the symbol string is not converted at all.
there’s (possibly) one kind of solution, though. MDC has a String.fromChar Code() fix for UTF-16. it could work for multibytes as well (if you change the base values … which I don’t know).
can anyone help me fix that problem?
thanks
I want to display some Unicode Entities (arond U+2650, some graphical symbols) but I can’t get them to display in the browser (tested FF, Safari)
what I have:
.html file (utf-8 encoded)
.js file (utf-8 encoded)
insert:
Code:
obj.symbol = "♜"; // somewhere later in the code [I]element[/I].innerHTML = obj.symbol;
ex. "♜"
strangely enough, if I select and copy-paste the text into my editor, I get the character as if nothing had happened. ah, yes, and of course the ACSII and ISO range values all work (e.g. 252).
if I use
Code:
obj.symbol = "&#9820"; // somewhere later in the code [I]element[/I].innerHTML = obj.symbol;
there’s (possibly) one kind of solution, though. MDC has a String.fromChar Code() fix for UTF-16. it could work for multibytes as well (if you change the base values … which I don’t know).
can anyone help me fix that problem?
thanks
Comment