HYPHEN-MINUS vs EM DASH

-
HYPHEN-MINUS
U+002D
View details →
EM DASH
U+2014
View details →
VS

Property Comparison

Property - U+002D — U+2014
Name HYPHEN-MINUS EM DASH
Block Basic Latin General Punctuation
Script Zyyy Zyyy
Category Dash Punctuation (Pd) Dash Punctuation (Pd)
Bidirectional ES ON

Encoding Comparison

Format U+002D U+2014
unicode U+002D U+2014
decimal 45 8212
htmldecimal - —
htmlhex - —
css \002D \2014
javascript \u{2D} \u{2014}
python \u002d \u2014
java \u002D \u2014
go \u002D \u2014
ruby \u{2D} \u{2014}
rust \u{2D} \u{2014}
ccpp \u002d \u2014
urlencoded - %E2%80%94
utf8bytes 2d e2 80 94
utf16bebytes 00 2d 20 14
utf32bebytes 00 00 00 2d 00 00 20 14

How to Distinguish

Both characters use the Zyyy script but are in different blocks: HYPHEN-MINUS in Basic Latin and EM DASH in General Punctuation.

Tip: Paste the character into a hex editor or use charCodeAt() in JavaScript to check the actual codepoint.

Related Comparisons

- HYPHEN-MINUS details — EM DASH details All Comparisons