Martin Quinson mquinson@ens-lyon.fr wrote: ...
"BLOCKS and BYTES may be followed by the following multiplicative suffixes:\n" "xM M, c 1, w 2, b 512, kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n" "GB 1,000,000,000, G 1,073,741,824, and so on for T, P, E, Z, Y.\n"
...
This is because people from France would like to write 1.000.000 and the ones from canada would like to write 1,000,000. To fix this issue, there is three solutions: either split the translation for both country (quite overkilling), choose that the solution from France should apply worldwide (quite rude) or use fprintf to have the LC_NUMERIC field from locales to do the job automagically.
Hi Martin!
Thank you for the patch.
Taking df's --help as an example, what do you think about this as an alternative to writing out 1,000,000 and 1,048,576?
SIZE may be (or may be an integer optionally followed by) one of following: kB 1000, K 1024, MB 1000*1000, M 1024*1024 and so on for G, T, P, E, Z, Y.
I'm reluctant to encourage the use of `%'d', for fear that it's not portable enough. However, maybe there is hope in the longer term: we could use a replacement version of printf on systems that don't support `modern' :-) features like that.
Jim