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
- UTF-16 — A Unicode encoding that stores each character as one or two 16-bit code units, used in memory by Java and JavaScript strings and by Windows.
- Unicode — The standard that gives every character in every writing system its own number, called a code point.
- Maven property — A named value in a pom.xml properties block, reused elsewhere in the file as ${name} or read by plugins.
- ASCII — An old character encoding covering 128 characters: English letters, digits, punctuation and control codes.
- character encoding — The rule for turning text characters into bytes and back, such as UTF-8.
- multi-byte character — A character that takes more than one byte in its encoding, such as é (two bytes in UTF-8) or most emoji (four bytes).
Taught in
- The Toolchain: Maven — Modern Java: Virtual Threads & High-Throughput Services
- Console And File I/O With Streams — Oracle Certified Professional: Java SE 21 Developer (1Z0-830) Exam Prep
- Final Review And Exam Day — Oracle Certified Professional: Java SE 21 Developer (1Z0-830) Exam Prep
- Buffer Encodings: UTF-8, Hex, Base64 & Slicing — Node.js Internals & Backend Services
- Transform Streams: Custom Packet Decoding & Codecs — Node.js Internals & Backend Services
- Paths And Files The Modern Way — Hands-on Python: Complete Video Course & Book
- JSON And CSV — Hands-on Python: Complete Video Course & Book
- Shipping: scripts, entry points and git — Hands-on Python: Complete Video Course & Book
- Testing The Filesystem — Automated Testing, TDD & Quality Engineering
- The Class That Shared One List — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep
- Characters As Numbers — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep
- Strings Sprint — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep
- Streams, Handles And Open Modes — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep
- Mock, Review And Exam Day — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep
- Encodings, Locales And Time Zones — LPIC-1 Linux Administrator (101-500 and 102-500) Exam Prep
References
- RFC 3629: UTF-8, a transformation format of ISO 10646
- Unicode FAQ: UTF-8, UTF-16, UTF-32 and BOM
- MDN: UTF-8
- Unicode HOWTO