https://bugzilla.wikimedia.org/show_bug.cgi?id=8327
Paul Selitskas <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #18 from Paul Selitskas <[email protected]> 2012-11-27 12:41:01 UTC --- (In reply to comment #17) > Reopening. Yes, the hyphen-minus (U+002D) is a common replacement for the > minus > sign (U+2212). But since we are using Unicode everywhere I don't see a reason > why the {{formatnum:}} parser function should not do the same. Why does it > need > to be ASCII compatible? See http://en.wikipedia.org/wiki/Hyphen-minus for more > details. > > You can not use the output of a {{formatnum:}} call in an {{#expr:}} anyway. > Stuff like {{#expr: {{formatnum:12345}} / 1000}} does not work anyway no > matter > which character is used. Depending on the language it causes an expression > error (if your languages uses commas for digit grouping) or prints "0,012345" > instead of "12,345" (if your languages uses dots for digit grouping). > > That said I don't see a reason why {{formatnum:-12345}} can not use the proper > minus sign. It can't break existing code because, as I said, {{formatnum:}} > can > not be used inside other parser functions. > > Currently we are using code like {{#ifexpr: number < 0 | −{{formatnum: > {{#expr: abs number }} }} | {{formatnum: number }} }}. This code will not > break > if {{formatnum:}} uses the proper minus sign. Totally agree. {{formatnum}} (and a PHP method on its back) is a presentation-level function, and it won't be used in {{#expr}} and other calculations by any means. It is just this function's nature to be used the last, when the resulting value is done. I also checked against pasting the negative value with the Unicode minus into Windows' Calculator, and it all worked just fine. Perhaps, Gnome/KDE/... calculators do so as well. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
