Ricardo Díaz Martín ha scritto: > I confirm I'm have got the same problem in Spanish configuration. For > decimals we use "," (coma) and gambas returns "," (coma - it's ok) but for > milliar we use "." (point) and gambas returns " " (blank). All the rest of > locale data (date, time and currency are fine) > ... >>>>> ? Format$(Val("14555888") / 1000, "#,###.000") >>>>> 14,555.888 >>>>> >>>>> ...this is OK >>>>> >>>>> LANG="es_ES.utf8" and for LANG="it_IT.utf8" >>>>> >>>>> ? Format$(Val("14555888") / 1000, "#,###.000") >>>>> 14 555,888 >>>>> >>>>> There is a space where should be a . but I can cope with it >>>>> >>>>> For LANG="ru_RU.utf8" >>>>> >>>>> ? Format$(Val("14555888") / 1000, "#,###.000") >>>>> 14??555,888 >>>>> >>>>> where ?? are 3F3F . These are not recognised as UTF-8 valid >>>>> characters. >>>>> >>>>> ... >>> I confirm that number formatting (and perhaps dates too - can't remember >>> well) don't work as expected in italian locale (tried on Debian systems >>> ... >>> >> Gambas takes the data from the standard glib functions. So I think, but I >> can >> be wrong, that the glibc locale data may be wrong. I know that for sure >> because the thousand separator returned for French is false. I added an >> hack >> in Gambas to fix that, but if other locales have incorrect data too, a >> better >> solution must be found. >> >> I will check (again) what the interpreter does. At the same time, it would >> be >> cool if some people can check the locale data returned by Gambas for their >> own >> language (mainly date, time and thousand separator, and currency >> characters) >> and tell me what is wrong. I know French and US locale only! >> >> Regards, >> Pino Zollo let me know that there is probably an error in /usr/share/i18n/locales/it_IT.utf8
------- LC_NUMERIC decimal_point "<U002C>" thousands_sep "" <---------- (empty string, not SPACE) grouping 0;0 END LC_NUMERIC -------------- I do not have that file, but instead other two, but with the same error. Perhaps we can contact the author, It seems strange to me that a danish guy (the author of that file is danish) made the same mistake on spanish, italian, french (and probably all the rest of Europe...) which, I think, share the same conventions about numbers; so someone who knows glibc better than me could verify, before contact him. I will try to correct it_IT file and verify, just for curiosity, but if someone else knows the matter better, please let me know... Another question is this. I was misguided by the fact that KDE has its own locale management: it lets you to change locale settings, and I played with those settings to investigate - but gambas does not seem to use them. Should gambas use KDE settings when using QT, or when using the GUI switcher? Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user