Step 1: Determine the UTF-8 encoding bit layout
The character ― has the Unicode code point U+2015. In UTF-8, it is encoded using 3 bytes because its codepoint is in the range of
0x0800
to0xffff
.
Therefore we know that the UTF-8 encoding will be done over 16 bits within the final 24 bits and that it will have the format:1110xxxx 10xxxxxx 10xxxxxx
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+2015 to binary:
00100000 00010101
. 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:
11100010 10000000 10010101
HORIZONTAL BAR·U+2015
Character Information
Character Representations
Click elements to copyEncoding | Hex | Binary |
---|---|---|
UTF8 | E2 80 95 | 11100010 10000000 10010101 |
UTF16 (big Endian) | 20 15 | 00100000 00010101 |
UTF16 (little Endian) | 15 20 | 00010101 00100000 |
UTF32 (big Endian) | 00 00 20 15 | 00000000 00000000 00100000 00010101 |
UTF32 (little Endian) | 15 20 00 00 | 00010101 00100000 00000000 00000000 |
Description
The Unicode character U+2015, known as the HORIZONTAL BAR, plays a crucial role in digital text formatting. This typographical symbol, also referred to as the "vertical bar," serves as a visual separator or divider within a text, helping to distinguish different sections or groupings of information. The HORIZONTAL BAR is widely used in markup languages like HTML for web content and can be easily incorporated using the HTML entity | or the Unicode character itself. In programming and computer science, this symbol often appears in command-line interfaces as a delimiter in arguments or in regular expressions to denote alternative choices. While it doesn't have any cultural, linguistic, or technical context like other typographical symbols, the HORIZONTAL BAR is an essential tool for organizing and improving readability in digital texts.
How to type the ― symbol on Windows
Hold Alt and type 8213 on the numpad. Or use Character Map.