Most developers know HTML bold and italic tags. But what happens when your text lands in an environment that strips all HTML โ WhatsApp, Discord DMs, plain text emails, or Instagram captions?
The answer: Unicode mathematical characters.
Why Unicode Styling Works Everywhere
Unicode includes dedicated ranges for bold, italic, bold-italic, and styled variants of Latin letters. These are not formatting instructions โ they are different characters that happen to look styled.
Regular: Hello World Bold: ๐๐ฒ๐น๐น๐ผ ๐ช๐ผ๐ฟ๐น๐ฑ Italic: ๐๐ฆ๐ญ๐ญ๐ฐ ๐๐ฐ๐ณ๐ญ๐ฅ Strike: Hฬถeฬถlฬถlฬถoฬถ ฬถWฬถoฬถrฬถlฬถdฬถ
Enter fullscreen mode
Exit fullscreen mode
Because they are actual characters, they survive:
Copy-paste into any app
Plain text environments
WhatsApp, Discord, Instagram, Telegram
SMS on modern phones
LinkedIn posts (which strip HTML completely)
The Unicode Ranges
Mathematical Bold โ starts at U+1D400
// Offset for bold lowercase 'a' = U+1D41A const BOLD_OFFSET_LOWER = 0x1D41A - ' a ' .โฆ