UTF-8

The most widely used character encoding, which can represent every Unicode character and matches ASCII for plain English letters.

In more detail

Each character takes one to four bytes. It is the default encoding on the web and in modern systems, but not on every system for every tool, which is why naming it explicitly avoids surprises.

Examples

Maven: <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
open("cafe.txt", "w", encoding="utf-8")
In this course: Plain English letters take one byte each, and other characters take two to four. It is the safe explicit choice when a test writes or reads text files.

Related terms

Taught in

References

Certification courses