U+2015 · Dash punctuation
HTML entity
―
LaTeX
\horizbar
Horizontal Bar Symbol ―
― is horizontal bar, U+2015. Unicode also records it as “quotation dash”. It was added in Unicode 1.1, and Unicode files it under Dash punctuation.
Also known as
- quotation dash
Unicode 1.0 called this character quotation dash. The standard renamed it later, but documents, fonts and font-editing tools from that era still use the old name.
What Unicode says about ―
long dash introducing quoted text
— annotation from the Unicode Standard, NamesList.txt
Codes & technical data
| Unicode | U+2015 | |
|---|---|---|
| HTML hex | ― | |
| HTML decimal | ― | |
| CSS | \2015 | |
| JavaScript | \u{2015} | |
| Python | \U00002015 | |
| Java / C# | \u2015 | |
| Rust | \u{2015} | |
| Swift | \u{2015} | |
| PHP | \u{2015} | |
| URL encoded | %E2%80%95 | |
| UTF-8 bytes | E2 80 95 | |
| UTF-16 bytes | 2015 | |
| Base64 | 4oCV | |
| Decimal | 8213 | |
| HTML entity | ― | |
| LaTeX | \horizbar | |
| Category | Dash punctuation (Pd) | |
| Introduced | Unicode 1.1 | |
Will ― survive being pasted?
- Normalisation. Yes. ― is unchanged by NFKC, so it survives normalising systems intact.
- Legacy encodings. ― is Unicode-only — it has no Latin-1 equivalent, so a system stuck on an 8-bit encoding cannot represent it.
- Size. 3 bytes in UTF-8. Character-limited fields — SMS, bios, some form validators — usually count bytes, not characters.
Other bar characters
Unicode names 24 characters ending in “bar”. They differ by direction, weight or decoration rather than by meaning.
Nearby in General Punctuation
The typographic marks that word processors quietly substitute for their ASCII lookalikes — real quotation marks, en and em dashes, the ellipsis. It also holds the invisible characters: zero-width spaces, joiners and directional marks that do work without drawing anything.
How to type ―
| Windows | Type 2015 then press Alt+X |
|---|---|
| macOS | Press Ctrl+Cmd+Space, then search for “horizontal bar” |
| Linux | Press Ctrl+Shift+U, type 2015, press Enter |
| HTML | ― |
About Unicode’s Dash punctuation category
This is dash punctuation. Line-breaking algorithms are allowed to break a line after a dash, which is why a hyphen behaves differently from a minus sign even when they look almost identical.
Frequently asked questions
- How do I type the ― horizontal bar symbol?
- On Windows, type 2015 and press Alt+X. On Linux press Ctrl+Shift+U then 2015. On any system the quickest route is the copy button on this page.
- What is the code for ―?
- Horizontal Bar is U+2015, written in HTML as ― and in LaTeX as \horizbar. In UTF-8 it takes 3 bytes. The table above lists every escape format.
- What kind of character is ―?
- Horizontal Bar is filed under Dash punctuation in the General Punctuation block, and was introduced in Unicode 1.1. This is dash punctuation. Line-breaking algorithms are allowed to break a line after a dash, which is why a hyphen behaves differently from a minus sign even when they look almost identical.