[Gambas-user] [Gambas Bug Tracker] Bug #704: Format does not handle time separator correctly

Tobias Boege taboege at ...626...
Fri Aug 28 18:52:55 CEST 2015


On Fri, 28 Aug 2015, Jussi Lahtinen wrote:
> The point was, how do I test whether Format function works in some other
> language than what I'm currently using?
> Month names are not any bigger problem than the separators. How do I know
> which is the correct separator?
> 

(Sorry, I haven't really paid attention to the whole thread here and I'm no
locale expert, so what I say may miss the point.)

AFAICS you can use the C library's setlocale(3) function to set the locale
of the Gambas process. If that doesn't work (haven't tested in a long time
and remember I had some problems last time I tried that), you can at least
set the LC_ALL environment variable prior to starting the Gambas project.

As soon as the locale is set, you can use localeconv(3) to get a struct
lconv which, according to locale(7), contains a field `decimal_point' where
you find the decimal separator among lots of other information.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the User mailing list