Now according to MSDN, the LCTYPE #LOCALE_SDECIMAL can return up to 4 characters!!!
Does anyone know of a country/language/locale in which the decimal separator is more than 1 character? If there really are such locales then I need to rewrite certain routines in my code.
Thanks.
I may look like a mule, but I'm not a complete ass.
Kaeru Gaman wrote:german localization returns a comma.
we write 1.000.000,00
never heard of any notation using more than one char.
I agree. My program will cope with any decimal-separator and thousand-separator providing they are both single characters. With MSDN saying that each of these could occupy 4 characters (including the terminating null) I am just a wee bit worried as certain routines would require a complete rewrite. Basically, I have to be able to take numeric data formatted from any locale and convert it to a form which my program can work with etc. Everything is fine, except for this multiple character issue!
I may look like a mule, but I'm not a complete ass.
I wonder if this is just for some custom format when the user has set a custom decimal separator etc? Limit it to 3 characters + null! I guess this could be it.
Not sure I want to support such crazyness though!
I may look like a mule, but I'm not a complete ass.
Trond wrote:I'm not sure if this can be done reliably. If the user sets the decimal separator to be same character as the digit grouping symbol then you're stuck.
And so would the user be!!!
If someone was daft enough to do that then my program would be the least of their worries, at least in terms of programs which would subsequently contribute to the overall chaos which would ensue!
I may look like a mule, but I'm not a complete ass.