Skip to content
EmojiDB

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

UnicodeU+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 bytesE2 80 95
UTF-16 bytes2015
Base644oCV
Decimal8213
HTML entity―
LaTeX\horizbar
CategoryDash punctuation (Pd)
IntroducedUnicode 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.

All 71 characters in General Punctuation →

How to type ―

WindowsType 2015 then press Alt+X
macOSPress Ctrl+Cmd+Space, then search for “horizontal bar”
LinuxPress 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.