Marc Dirix <[email protected]> wrote:

> Looking at the sprintf documentation, and further on to pike's sprintf.
> It is mentioned that the output of a float is locale dependend.

Yes, you can switch locale using Gettext.setlocale. Note though that
there might be things that don't work entirely well when the decimal and
thousands separators change (especially in older pike versions) - I
wouldn't recommend it.

> Is it somewhere or somehow possible to define this locale for a virtual
> server (different than the host system locale? )

Unfortunately not. Pike needs a better Locale library that makes it
possible to use explicit locale contexts and thread local locales.
Currently it only wraps the libc locale functionality, which is process
global and therefore deficient for apps like Roxen.

  • <sprintf> Marc Dirix
    • Re: <sprintf> Martin Stjernholm

Reply via email to