javascript - Unicode displaying inconsistently when escaped in JS vs HTML -
i'm trying insert musical coda symbol <p> element javascript, it's showing incorrectly. musical symbol shows fine when it's html-escaped however. reason inconsistency?
http://jsfiddle.net/4m3kltk5/3/
ps: happens on chrome , firefox on mac, haven't yet had chance test on other browsers.
try using x.innerhtml = '\ud834\udd0c'; should work. code character should \ud834\udd0c instead of \u1d10c
Comments
Post a Comment