Author

Topic: Treat comma and dot the same (Read 908 times)

sr. member
Activity: 317
Merit: 275
June 25, 2014, 04:11:22 PM
#8
Yeah I agree. The vast majority of users send less than 1,000 BTC for 90%+ transactions, it's a small minority that sends 1,000+ coins in some rare circumstances. There really is no need for a thousand separator at all. I doubt anyone ever bought a pizza for "10,000" BTC, but "10000".
hero member
Activity: 938
Merit: 500
https://youengine.io/
June 25, 2014, 11:54:42 AM
#7
The easiest and least dangerous / most foolproof way would be to not allow thousands-separators at all and parse "," or "." always as decimal separator and flag it as an error if more than one is detected.

Also it should accept number literals like

123m

123u

because other software that accepts large ranges of numbers does that too and it has been proven to be very convenient.


sr. member
Activity: 317
Merit: 275
June 25, 2014, 04:27:18 AM
#6
By the way, I saw ' being used as a thousand separator in Switzerland a lot. You should probably add that as an option too.
sr. member
Activity: 317
Merit: 275
June 18, 2014, 05:23:30 PM
#5
Because there are so many possibilities in MBHD we have a preferences screen where users can choose:
Oh, that's great then!

But in the case of my OP, inputting 0,1 should produce a warning, telling me the input is invalid, not try to send an amount equal to 1 BTC. Maybe it does, I don't know, I haven't tried clicking on send to see what happens.

Mistyping , instead of . or vice-versa (and not noticing it) is quite common...
legendary
Activity: 1708
Merit: 1066
June 16, 2014, 03:58:39 PM
#4
The OP stated that they want a comma and a dot to mean the same thing - but that just isn't the case across the globe.

For instance, how much is 1,001 ?
It is locale specific.

In the UK or US it means one thousand and one.
In Germany it mean one and a thousandth.
And in the German speaking area of Switzerland it is different to Germany as it means one thousand and one.

Because there are so many possibilities in MBHD we have a preferences screen where users can choose:

Do they want currency code prefix or suffix ?
What is the thousand separator to use ? ('.', ',' or a space)
What is the decimal separator to use ? (",' or '.')
Do you want to use the currency code (e.g. USD) or currency symbol (e.g. $)
What bitcoin units to use ? (several, include millis, micros, satoshis, using the BTC icon or the ecogenex one.)

Hopefully that should cover all local customs.

hero member
Activity: 658
Merit: 500
June 16, 2014, 12:25:10 PM
#3
For instance, in the UK 1,000 means one thousand but in Germany it means one.
But people don't write 1,000 when they mean 1, and most of the time if they want a thousand they would write 1000 (without comma or dot).
legendary
Activity: 1708
Merit: 1066
June 16, 2014, 08:56:01 AM
#2
This isn't possible because they aren't the same, and the meaning varies from contry to country.

For instance, in the UK:

1,000 means one thousand but in Germany it means one.

In MBHD we have a 'Bitcoin' setup screen so that you can choose the exact format you want to use, including spaces for thousand separators which is used in Russia.
sr. member
Activity: 317
Merit: 275
June 03, 2014, 07:08:45 AM
#1
If I input 0,1 in the send field instead of 0.1 (or even 0,001, etc.), the amount of € that it wants to send is equal to 1 whole bitcoin (476.91 at the moment).

Please treat the comma and dot as the same decimal separator.
Jump to: