A Wordpress Annoyance - Em- and En-Dashes
Wordpress has always had trouble with interpreting the “–” or the em-dash. You use em-dashes to separate phrases. In traditional typography, this was an extra-long dash with no spaces between the dash and the surrounding letters. Then the modern typewriter came out, and one used two short dashes, or hyphens, to create the em-dash effect. En-dashes would be a single hyphen with spaces around it, and would be used to connote a “through” effect, as in “July 5 - 6.”
Wordpress doesn’t like the “–” with no spaces. If you take a look at wp-includes/functions-formatting.php, Wordpress does this:
$curl = str_replace('---', '—', $curl);
$curl = str_replace(' -- ', ' — ', $curl);
$curl = str_replace('--', '–', $curl);
So if you want an em-dash, you either use three dashes with no spaces, or two dashes with spaces. You’ll get ASCII #8212, the proper em-dash. Two dashes with no spaces–the traditional way of creating the em-dash–results in ASCII #8211, or the en-dash.
This is probably some compromise to distinguish between XML entities and common usage. But the usage part is incorrect.
If you want an en-dash, you should use a single dash with surrounding spaces. If you want an em-dash, you should use a double-dash with no spaces. Instead, Wordpress creates this brand new typographic proxy, the triple-dash. Why create a new, obscure standard when the traditional one works?
Instead of hacking the code, I’m going to play Wordpress’s game. I’ll switch to the double-dash with surrounding spaces, or maybe even the triple-dash, hoping that Wordpress will fix this in the future and then keep Wordpress typographically backwards-compatible. So where Wordpress tries to make markup less necessary and blogging more user-friendly and WYSIWIG, they’ve gone and created their own markup making our lives harder.