Unicode for the Modern Web
HTML, CSS, JavaScript, and Beyond
A complete guide to using Unicode correctly in web development — HTML, CSS, JavaScript, APIs, databases, and deployment. Essential reading for frontend and full-stack developers.
HTML and Unicode: Entities, Escapes, and Encoding
Getting Unicode right in HTML starts with the correct meta charset declaration. This chapter covers named vs numeric entities, when to use escapes, and how browsers decode character encoding.
CSS and Unicode: Beyond content: ""
CSS interacts with Unicode through the content property, unicode-range, text-transform, and word-break. This chapter covers all the ways CSS handles international text and special characters.
JavaScript Strings: The UTF-16 Legacy
JavaScript strings are UTF-16 under the hood, leading to surprising behavior with emoji and supplementary characters. This chapter covers String.fromCodePoint, for...of iteration, TextEncoder/TextDecoder, and the Intl APIs.
APIs and Unicode: JSON, URLs, and Headers
JSON's \uXXXX escapes, percent-encoding in URLs, IDN, Content-Type charset headers — APIs have many Unicode touchpoints. This chapter provides a comprehensive guide to handling Unicode in HTTP APIs.
Databases and Unicode: Collation Matters
MySQL's utf8 vs utf8mb4 gotcha has bitten countless developers. This chapter covers proper database encoding setup, PostgreSQL ICU collation, case-insensitive queries, and sorting internationalized data.
Fonts and Rendering: Making It Look Right
Font fallback chains, system-ui, variable fonts, and missing glyph detection — this chapter covers everything you need to know about rendering Unicode characters correctly in web browsers.
Internationalization: i18n Best Practices
Accept-Language, locale-aware formatting, pluralization, text direction, and language tags — this chapter provides the definitive guide to building web applications that work for every language.