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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -