I recently realized that some countries display floating point numbers with different comma/period notation.
ie. we would have 12,500.34, and some countries would list it as 12.500,34
This may not be a problem with display, but what about text input? For example, I imagine that if I had a decimal type and displayed it in a label, that the ToString() method (or equiv in your language of choice) would use the localization settings and display it properly, and the various parsing 'str->number' methods would probably work too.
But what about text validation? Like say I want a textbox to only allow 5 numbers, and then an optional decimal point and up to 4 more numbers? What is a common solution is this case, when you don't know what their delimiters will be? Obviously the hardcoded regex patterns i'm using now will fail, so I'm just wondering what some of you have done in these cases?
thanks for any advice