Tuesday, July 26, 2005

EBay, What Have You Done?

As you certainly know, decimal delimiters and thousand separators differ depending on locale settings. While US-Americans expect something like this

USD 1,000.00

... on a German locale, the same amount is formatted like that

USD 1.000,00

Fair enough. One might expect that EBay is capable of handling those little local differences on their global marketplace. BUT THEY DON'T! In their opinion

USD 49,99
USD 20,00
USD 10,00

... adds up to:

USD 1.069,99

If Donald Knuth could only see what people charge for "The Art Of Computer Programming" nowadays. ;-)

Sorry for the poor image quality, all I had around at that time was Microsoft Photoeditor - no idea why it thinks it has to dither solid color image data.


Reminds me of one former colleague who insisted on writing the decimal value formatter and parser for our monetary input fields (he claimed to have experience from his previous work on ATM terminals - good lord!). If you tabbed through his fields without actually typing something, the value would change (his formatting and parsing algorithms were, well, inconsistent) - e.g. on the first FocusLost from an original input of "10,0" to "100" (?!?) and on the next FocusLost further to "100.00". Looked funny, but just as long as no customer would ever get to see it. Luckily we got rid of it quite early in the project.

Yes, those were the days of Java 1.0 (before java.text.NumberFormat even existed - if I remember correctly it came along with JDK1.1).