(Actually a dupe of another question but that was incorrectly closed so I’m posting here until the other question gets reopened, and this one merged.)

This has bugged me for ages. The website uses hyphens in negative numbers throughout. It should use the minus sign instead.

Of course it’s not important. It just looks really ugly.

The new reputation reporting tracker (thumbs up!) makes this particularly obvious:


Jin and waffles say on the other thread that for the SO font, the dash actually looks better than the minus sign but I think they made a mistake: They might have used the en-dash accidentally, which does indeed look even worse than the hyphen here.

  • 9
    Obligatory XKCD reference for this kind of discussions: xkcd.com/1015 – sbi Mar 2 '12 at 10:10
  • 4
    @sbi Has a point, this only bugs people who actually notice it. But those, it bugs hard. I can’t mentally “switch off” noticing bad typography. – Konrad Rudolph Mar 2 '12 at 10:12
  • Actually, my immediate thought was "What happens if I copy & paste those numbers into a spreadsheet program?" I suppose Excel will not be able to tell that a "—" (em-dash) is supposed to be a "-" (minus). Therefore I upvoted this question. – sbi Mar 2 '12 at 10:17
  • @sbi Wow, Excel sucks. :D I’ve tried it, it recognises neither dashes nor the Unicode minus sign U+2212 – Konrad Rudolph Mar 2 '12 at 10:20
  • "I suppose Excel will not be able to..." I haven't tried. Maybe it does. From a programmer's POV, it's still the wrong char, though. And I'm a programmer on a programmers' website. :) – sbi Mar 2 '12 at 10:22
  • 3
    Facetious comment first: since a hyphen is not part of the numerical representation of a number, all the supposed negative numbers on this site are actually positive! This means that we need a massive rep recalc whereby all down-votes are actually counted positively. – Andrew Stacey Mar 2 '12 at 10:30
  • 8
    Serious comment second: Forget Excel, I wonder how screen readers deal with this. Do they read "hyphen ten"? How is one supposed to know that that means minus ten? – Andrew Stacey Mar 2 '12 at 10:31
  • Is it actually 'wrong', given that the character is named HYPHEN-MINUS and "used for either hyphen or minus sign" ? (this is a serious question) – AakashM Mar 2 '12 at 10:50
  • 5
    @AakashM Typographically, yes, it’s wrong. There can be no question – it’s simply rendered as a hyphen and those two characters are rendered completely different. The important point is that it doesn’t match the plus sign. The Unicode standard simply takes a realistic stance: since the hyphen has been in existence on typewriters much longer and the minus sign isn’t on any keyboard, it is entirely acceptable not to require a convoluted action to type the “correct” character. But this argument doesn’t apply here since the number display is generated by a software, not a person typing them. – Konrad Rudolph Mar 2 '12 at 11:09
  • 1
    Forgive my ignorance, but what's the difference between a hyphen and a minus sign? I thought they were the same character. I know what an em-dash and an en-dash are, but I thought the - next to my equals sign was the same as the - in my number pad – Adam Rackis Mar 9 '12 at 21:46
  • @Jon - However, in environments that are restricted to ISO 646, and often in computing generally, the hyphen is represented by a hyphen-minus ( - ), which is well known and easy to enter on keyboards. so under what circumstances will there actually be a difference between a hyphen and a minus sign – Adam Rackis Mar 9 '12 at 21:58
  • 1
    @Adam: Oops. Misread the comment. That I don't know. Nothing? – Jon Ericson Mar 9 '12 at 21:59
  • @Adam The “minus” on your numblock isn’t a minus, it’s also the hyphen. However, there is a separate character (which is not available on common keyboard layouts) for a minus sign which renders subtly but fundamentally different: it is on the same height, and has the same width, as the “+” sign of the same font. Contrast this with the hyphen (just look at my screenshots). Once you know what the difference is, the wrong character becomes a jarring annoyance. – Konrad Rudolph Mar 10 '12 at 0:59
  • 3
    +1 Full ack. Just because lots of people don't care or can't tell doesn't mean we shouldn't be doing it right, especially if it's such a simple thing to get right. – Kerrek SB Apr 8 '12 at 21:53
  • Related question: meta.tex.stackexchange.com/questions/2008/…, and still somewhat related: meta.stackexchange.com/questions/117979/… – doncherry Apr 9 '12 at 0:00

We won't be changing this, it adds way too much complexity to code that does something very, very simple...for very little benefit.

  • 4
    Not that I can see your code or anything, but... what does this have to do with code complexity? Could you be, perhaps, misunderstanding the question? From what I read, it's just using one character in place of another. – Jon Ericson Mar 9 '12 at 21:21
  • 1
    @Jon = thisIsANegativeIntergerVariable.ToString() is effectively what happens, the literal code is @re.RepChange, that's it. – Nick Craver Mar 9 '12 at 21:27
  • 2
    Now I'm really confused. Are you saying that some library's ToString() function outputs a dash as opposed to a minus sign for negative numbers? If so, that's a bug in the library, I'd say. – Jon Ericson Mar 9 '12 at 21:41
  • 4
    @JonEricson - this is default razor view behavior, feel free to file a bug with Microsoft :) – Nick Craver Mar 9 '12 at 21:41
  • 1
    Stepping off my high horse now... Ugh. That's truly annoying and I feel your pain. (Thanks for indulging my curiosity.) – Jon Ericson Mar 9 '12 at 21:44
  • 2
    GAHH!!! Is this a dash, or a hyphen? Is Razor spitting out negative numbers with an em-dash, an en-dash, or a hyphen? The question, and coments all seem to use them interchangeably. – Adam Rackis Mar 9 '12 at 22:04
  • 2
    So what you’re saying is effectively that you only have to replace x.ToString() with x.TypographicallyCorrectToString(), given an extension method which performs return x < 0 ? '\u2212' + Math.Abs(x).ToString() : x.ToString()? – EDIT I just see that, no, it’s not. It would at least necessitate patching the library. Well, I’m off to file a bug report then. It’s what I do today. – Konrad Rudolph Mar 10 '12 at 0:45
  • Did anything happen in the meantime? – Martin Ueding Jan 8 '15 at 15:09
  • 2

I’ll note that the recent achievements popup already uses true minus signs for reputation changes instead of hyphens.

But since Stack Exchange are too lazy to do it thoroughly, here’s a userscript:

// ==UserScript==
// @name     Stack Exchange: use true minus signs
// @version  1
// @grant    none
// @match    https://*.stackexchange.com/*
// @match    https://*.superuser.com/*
// @match    https://*.stackoverflow.com/*
// @match    https://*.mathoverflow.net/*
// @match    https://*.serverfault.com/*
// @match    https://*.askubuntu.com/*
// @match    https://stackapps.com/*
// @exclude  https://chat.stackexchange.com/*
// @exclude  https://api.stackexchange.com/*
// @exclude  https://data.stackexchange.com/*
// @exclude  https://openid.stackexchange.com/*
// @exclude  https://stackexchange.com/*
// @exclude  https://contests.stackoverflow.com/*
// @exclude  /^https?:\/\/winterbash\d{4,}\.stackexchange\.com\//
// ==/UserScript==

const fixupMinusUnder = (node) => {
    const fixup = node => {
        if (node.firstChild.nodeType !== document.TEXT_NODE)
        const text = node.firstChild.data.replace(/^\s*\u002d/, '\u2212');
        if (node.firstChild.data !== text)
            node.firstChild.data = text;
    const SELECTOR = `
        .js-vote-count > .fc-red-600,
        .mini-counts > :only-child,
        .js-followed-post .grid--cell.fs-body3,
        .vote-count-post > :only-child,
    if (node.matches(SELECTOR)) fixup(node)
    Array.prototype.forEach.call(node.querySelectorAll(SELECTOR), fixup);


new MutationObserver((mutations, self) => {
    for (const mut of mutations) {
        switch (mut.type) {
        case 'characterData':
        case 'childList':
}).observe(document.body, {
    childList: true,
    characterData: true,
    subtree: true,
  • 3
    I doubt their too lazy. I just think their time is better spent elsewhere. – Luuklag Mar 16 at 13:29
  • 3
    It took me like an hour to write and debug this script (which is mostly attributed to the fact that I had to do it as client-side after-the-fact DOM fixups). A proper fix would take half that time. It can’t be that much of an effort. – user3840170 Mar 16 at 14:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .