[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange Number Format


Hi Benoît

Thanks a lot!

I'll confirm the fix as soon as it arrived in the OBS.

Best regards, Claus

Am 24.08.26 um 12:49 schrieb Benoît Minisini:
Le 24/08/2026 à 11:41, Benoît Minisini a écrit :
Le 22/08/2026 à 14:47, Claus Dietrich a écrit :
Question: Why does

   System.Language = "de_CH.utf8"
   Print Format(1234567.89, "$,##0.00")

deliver 1_234_567.89 ?

It happens with the master as well with 3.22.0 on Linux Mint 22.0 Cinnamon. The Swiss language package is fully installed.

The cli command

   LC_NUMERIC=de_CH.UTF-8 printf "%'.2f\n" 1234567.89

correctly delivers 1’234’567.89

Is this a bug ?

A good weekend to all and

best regards

Claus



It's sort of a bug. At the moment, the interpreter only accepts ASCII characters as thousand separator, and use '_' when the separator is an UTF-8 character.

I will try to fix that...


It should be fixed by commit https://gitlab.com/gambas/gambas/-/commit/f1fbdd9a286bde80df95d4df7141245af3c70ee5.

Regards, 

References:
Strange Number FormatClaus Dietrich <claus.dietrich@xxxxxxxxxx>
Re: Strange Number FormatBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Strange Number FormatBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>