• Differentiate two seemingly identical characters
• Emoji (read this)
Single• See the "invisible" characters
The combination• Single Unicode character can be build from a Surrogate pair
• To calculate Unicode symbol from Surrogate Pair use
function surrogatePairToUnicode(code1, code2)
{
return 0x10000
+ ((code1 - 0xd800) << 0xa)
+ (code2 - 0xdc00)
};
• Vice versa
function unicodeToSurrogatePair(code)
{
const adj = code - 0x10000;
const high = 0xd800 + (adj >> 0xa);
const low = 0xdc00 + (adj & 0x3ff);
return [high, low];
};
• This list may interest you
• Use Ctrl + Shift + u followed by hex value to insert Unicode symbol. Works on Linux.