Page MenuHomePhabricator

Size of changes - minus-sign instead of hyphen
Open, LowestPublic

Description

In the version history of articles, mediawiki displays the size of changes in bytes. When the size of the change is negative, currently a hyphen-minus U+2010 (‐) is used. The correct sign would be the minus-sign U+2212 (−).


Version: unspecified
Severity: normal

Details

Reference
bz38579

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:54 AM
bzimport set Reference to bz38579.
bzimport added a subscriber: Unknown Object (MLST).

We are using - (hyphen-minus, U+002D) not ‐ (hyphen, U+2010). I'm not sure there's a benefit of using − (minus signm U+2212), given that hyphen-minus can work as a minus and is ASCII compatible.

The code to change would be Language::formatNum() at line 2881 of Language.php

mr.heat wrote:

Set priority to "normal" per user request. I can confirm the current character is wrong. It's a common replacement for the minus sign but since we are using Unicode anyway I don't see a strong reason why the history and diff pages need to be ASCII compatible. They aren't anyway.

mr.heat wrote:

It seems $wgMiserMode is the reason why the character is wrong.

http://www.mediawiki.org/wiki/Special:Code/MediaWiki/48986

So basically the bug is that {{formatnum:-12345}} prints negative numbers with the wrong minus character. Why is that? Bug 8327 is closed as "wontfix" without providing a proper reason.

Aklapper lowered the priority of this task from Medium to Lowest.Aug 10 2019, 4:50 PM
Aklapper removed a subscriber: wikibugs-l-list.