Choose the accurate relationship between Unicode and UTF-8.
Which explanation is appropriate?
Unicode assigns code points to characters; UTF-8 encodes those code points as variable-length byte sequences.
Detailed explanation
Incorrect. Unicode is not Linux-specific or an 8-bit encoding.
Incorrect. Unicode is not Linux-specific or an 8-bit encoding.
Incorrect. UTF-8 is an encoding of Unicode code points.
Incorrect. UTF-8 is an encoding of Unicode code points.
Correct. UTF-8 represents Unicode code points in one-to-four-byte sequences.
Correct. UTF-8 represents Unicode code points in one-to-four-byte sequences.
Incorrect. UTF-8 is variable length, not fixed eight-byte storage.
Incorrect. UTF-8 is variable length, not fixed eight-byte storage.
Try it yourself
An example you can run in a temporary verification environment.
printf 'Aあ' | od -An -t x1Expected result
41 e3 81 82(UTF-8環境)Key points
- Unicode code points
- UTF-8 encoding
- One to four bytes
Notes
- Environment: UTF-8 shell source / od
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.