Step 1: Determine the UTF-8 encoding bit layout
The character % has the Unicode code point U+0025. In UTF-8, it is encoded using 1 byte because its codepoint is in the range of
0x0000
to0x007f
.
Therefore we know that the UTF-8 encoding will be done over 7 bits within the final 8 bits and that it will have the format:0xxxxxxx
Where thex
are the payload bits.UTF-8 Encoding bit layout by codepoint range Codepoint Range Bytes Bit pattern Payload length U+0000 - U+007F 1 0xxxxxxx 7 bits U+0080 - U+07FF 2 110xxxxx 10xxxxxx 11 bits U+0800 - U+FFFF 3 1110xxxx 10xxxxxx 10xxxxxx 16 bits U+10000 - U+10FFFF 4 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx 21 bits Step 2: Obtain the payload bits:
Convert the hexadecimal code point U+0025 to binary:
00100101
. Those are the payload bits.Step 3: Fill in the bits to match the bit pattern:
Obtain the final bytes by arranging the paylod bits to match the bit layout:
00100101
PERCENT SIGN·U+0025
Character Information
Character Representations
Click elements to copyEncoding | Hex | Binary |
---|---|---|
UTF8 | 25 | 00100101 |
UTF16 (big Endian) | 00 25 | 00000000 00100101 |
UTF16 (little Endian) | 25 00 | 00100101 00000000 |
UTF32 (big Endian) | 00 00 00 25 | 00000000 00000000 00000000 00100101 |
UTF32 (little Endian) | 25 00 00 00 | 00100101 00000000 00000000 00000000 |
Description
The Unicode character U+0025, also known as the percent sign (%), is a vital symbol in digital text with numerous applications across different platforms. Primarily used for arithmetic operations, this versatile character serves as an essential indicator for percentage calculations in programming languages such as Python, JavaScript, and C++. In HTML coding, it is utilized to denote comments, enabling developers to include explanatory notes within the source code that are not rendered on web pages. The percent sign's significance extends beyond its practical applications, as it has historical roots in mathematics, finance, and computing. Its name derives from per mille, or "by the thousand," reflecting its origins as an abbreviation for per centum, Latin for "by the hundred." This symbol carries cultural weight in some contexts, where it may represent more than just arithmetic operations. The percent sign belongs to the Basic Latin Unicode block (U+0000 to U+007F), a foundational component of the Unicode system that includes essential characters for programming languages, text documents, and various other applications. Despite its age-old origins in the ASCII character set, the percent sign remains an indispensable element in modern digital communication, reflecting both its enduring utility and adaptability across various contexts.
How to type the % symbol on Windows
Hold Alt and type 0037 on the numpad. Or use Character Map.