I ran into this problem with unicode icons I was using in the menus for some of my scripts. The solution I used to get it working was to escape the problematic characters as HTML entities. For example ⩤ would be converted to ⩤ So that I wouldn't have to keep track of this by hand, I set up my scripts' development environments with Node/Grunt utilities to automatically convert these characters from my source code. Here's a snippet of my Grunt configurations used to do that. 'string-replace': {
dist: {
files: {
'<%= pkg.version %>/<%= pkg.script %>': '<%= pkg.version %>/<%= pkg.script %>'
}
},
options: {
replacements: [
{
pattern: 'SCRIPT_VERSION',
replacement: '<%= pkg.version %>'
},
// Convert unicode characters to HTML entities.
{
pattern: /[\u{00FF}-\u{FFFFF}]/gu,
replacement: function(match) {
if (match.length === 2) {
let highSurrogate = match.charCodeAt(0);
let lowSurrogate = match.charCodeAt(1);
let astralCodePoint = (highSurrogate - 0xD800) * 0x400 + lowSurrogate - 0xDC00 + 0x10000;
return '&#' + astralCodePoint + ';';
}
else if (match.length === 1) {
let charCode = match.charCodeAt(0);
return '&#' + charCode + ';';
}
}
}
]
}
}