Bitcoin Forum
May 24, 2024, 05:39:12 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Treat comma and dot the same  (Read 908 times)
f3tus (OP)
Sr. Member
****
Offline Offline

Activity: 317
Merit: 275


View Profile
June 03, 2014, 11: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.
jim618
Legendary
*
Offline Offline

Activity: 1708
Merit: 1066



View Profile WWW
June 16, 2014, 12:56:01 PM
 #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.

MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
R2D221
Hero Member
*****
Offline Offline

Activity: 658
Merit: 500



View Profile
June 16, 2014, 04: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).

An economy based on endless growth is unsustainable.
jim618
Legendary
*
Offline Offline

Activity: 1708
Merit: 1066



View Profile WWW
June 16, 2014, 07: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.


MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
f3tus (OP)
Sr. Member
****
Offline Offline

Activity: 317
Merit: 275


View Profile
June 18, 2014, 09: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...
f3tus (OP)
Sr. Member
****
Offline Offline

Activity: 317
Merit: 275


View Profile
June 25, 2014, 08: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.
prof7bit
Hero Member
*****
Offline Offline

Activity: 938
Merit: 500


https://youengine.io/


View Profile WWW
June 25, 2014, 03:54:42 PM
 #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.



f3tus (OP)
Sr. Member
****
Offline Offline

Activity: 317
Merit: 275


View Profile
June 25, 2014, 08: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".
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!