Handle Unicode text, emoji, encoding, normalization, code points, and safe storage.
Lessons
Learn how text becomes bytes and back again.
What Is Character Encoding is easiest to learn by reading the example, changing it, and observing the result.
// Text is stored as numbers (code points) encoded into bytes.
const message = 'Hello नमस्ते 😀';
console.log('Characters:', [...message].length);
console.log('UTF-8 bytes:', new TextEncoder().encode(message).length);
// Always declare UTF-8: <meta charset="UTF-8">Practice the What Is Character Encoding example in a small scratch file, then explain what changed and why.