Hacker News new | ask | show | jobs
by davidmurdoch 936 days ago
Using a "comma" to refer to the decimal separator when talking about USD while writing in English about software (written in a computer language that uses a decimal point) took me on a mental rollercoaster. So much so that it led me to read the Wikipedia page on the decimal separator. My favorite part:

> Unicode defines a decimal separator key symbol (⎖ in hex U+2396, decimal 9110) which looks similar to the apostrophe. This symbol is from ISO/IEC 9995 and is intended for use on a keyboard to indicate a key that performs decimal separation.

1 comments

>> Unicode defines a decimal separator key symbol (⎖ in hex U+2396, decimal 9110) which looks similar to the apostrophe. This symbol is from ISO/IEC 9995 and is intended for use on a keyboard to indicate a key that performs decimal separation.

Egad, settling the ./, issue by selecting ⎖ is like settling the debate between 0-based arrays and 1-based by numbering them from ½. Or between little- and big-endian by choosing middle-endian.

Note the keyboard part. I think this is meant to be what they can physically print on the numpad section of an international-style keyboard. When you're typing numbers in a Euro locale you'd get `,` but in US English you would get a period. (At least, I hope that's what the decimal key on the numpad does when you set your locale to a certain locale. It would be obnoxious if when typing numbers in an English context, you had to go find the period key on the other side.)

I don't think we're meant to normally switch to actually putting that character in our numbers though. If so, clearly nobody has agreed to do it!

Huh, I don't see it that way. It's totally unambiguous, there would be no way for that character to have entered the number without it being the decimal separator.

Contrast that to choosing either a period or a comma and your setting yourself up for serious potential errors.

Obviously the user doesn't need to see that symbol, you can localize it however you want.