1. Glossary
  2. Character encoding

Character encoding

Character encoding defines a mapping between bytes and text. A sequence of bytes allows for different textual interpretations. By specifying a particular encoding (such as UTF-8), we specify how the sequence of bytes is to be interpreted.

For example, in HTML we normally declare a character encoding of UTF-8, using the following line:

html
<meta charset="utf-8" />

This ensures that you can use characters from just about any human language in your HTML document, and they will display reliably.

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.

AltStyle によって変換されたページ (->オリジナル) /