International number formats

We are looking into trying to handle converting from all the major international number formats in the Num Format transform. These are the formats we are aware of:

US/UK style:
1,234,567.89
1234567.89
1.23E6
1.23e6

European style:
1.234.567,89
1 234 567,89
1’234’567,89
1234567,89
1,23E6
1,23e6

Did we miss any?

Does anyone ever have to convert:

(n)

To:

-n

?

Indian Style ! Pretty please with a cherry on top .

1,23,456.00
11,23,456.00
1,11,23,456.00
11,11,23,456.00
1,23,11,23,456.00

v1.44.1 can convert Indian locale numbers to other locales using Num Format.

When converting to US, UK or European etc numbers to Hindi/Indian locale it doesn’t seem to get the digit grouping right. The Qt framework we used doesn’t seem to fully support Indian number grouping. I guess you could use Replace or Javascript and regex to do it? E.g.:

BTW We reported this issue to Qt a while back. Apparently it is fixed in Qt 6, so should be fixed in Easy Data Transform when we move to Qt 6 (probably for Easy Data Transform v2).
https://bugreports.qt.io/browse/QTBUG-116620

Thank you @Admin !

I will try JS to figure this and looking forward to V2

1 Like

Indian-Format.transform (1.7 KB)

1 Like

WOWSIE !! thanks as always @Admin

1’234’567.89
Swiss variant for currencies and coordinates

1 Like

I plan to handle apostrophes. But:

Is it always ’ (single quote, ASCII 39 in decimal)?

Or can it also be opening or closing curly quote?

https://typographyforlawyers.com/straight-and-curly-quotes.html