UTF-8

From WikiTech, the free technology encyclopedia

ASCII-compatible encoding for Unicode text (1992)

3 sources from Unicode Consortium, University of Cambridge Computer Laboratory (Markus Kuhn) and Internet Engineering Task Force / RFC Editor. Checked by ByteExplained editors on 4 December 2026. How we check facts

UTF-8 is a character encoding that represents the characters of Unicode as sequences of one to four 8-bit bytes.[1] It is the most widely used encoding form for Unicode that is compatible with ASCII, and it is the most common encoding on the web.[1]

Contents
  1. History
  2. How it works
  3. See also
  4. References

History

In September 1992 members of an X/Open committee asked Ken Thompson and Rob Pike of Bell Labs to review a proposed encoding called FSS-UTF.[2] The two thought it lacked an important property: a program picking up a stream of bytes part-way through could not easily find where the next character began.[2] According to Pike, Thompson worked out a better scheme on a placemat in a New Jersey diner, and the pair converted their Plan 9 operating system to the new encoding within a few days.[2] Thompson's design, following criteria set by Pike, was later adopted through X/Open and went by names such as FSS-UTF and UTF-2 before becoming known as UTF-8.[3]

The Internet Engineering Task Force published the current specification as RFC 3629 in November 2003, replacing the earlier RFC 2279.[3] It limits UTF-8 to the code points U+0000 to U+10FFFF, the same range that UTF-16 can represent.[3]

How it works

Each ASCII character keeps its original single-byte value, so any existing ASCII text is already valid UTF-8, and ASCII byte values never appear inside the multi-byte sequences used for other characters.[3][1] Other characters take two, three or four bytes, with supplementary characters always using a four-byte sequence.[1] Because UTF-8 is handled as a plain sequence of bytes, it has no byte-order problem; a byte-order mark is only an optional signature and can break files such as Unix shell scripts that must start with particular ASCII characters.[1] Unicode also defines UTF-16 and UTF-32, but UTF-8 is the form most often used on the web and is widely used by Linux and other Unix systems.[1]

See also

References

  1. ^ FAQ – UTF-8, UTF-16, UTF-32 & BOM. Unicode Consortium. unicode.org
  2. ^ UTF-8 history (Rob Pike, with notes by Russ Cox). University of Cambridge Computer Laboratory (Markus Kuhn). cl.cam.ac.uk
  3. ^ RFC 3629: UTF-8, a transformation format of ISO 10646. Internet Engineering Task Force / RFC Editor. rfc-editor.org
Technologies on WikiTech
Milestones in computing
All technologies