Re: gnome 1.2, localisation and C++ streams

>>>>> "Havoc" == Havoc Pennington <> writes:

    Havoc> Jean-Marc Valin <> writes:
    >>  I have just upgraded to gnome 1.2 and noticed it caused very
    >> undesirable effects with C++ streams. My language settings are
    >> set to french. I noticed that calling gnome_init(...) changes
    >> the way C++ streams print and parse decimal numbers.

    Havoc> gnome_init() is setting up the locale properly. C++ streams
    Havoc> localize their output by default, so floating point will be
    Havoc> like the %g format for printf(). You want the %f format for
    Havoc> printf() which is not localized (I don't think); in C++
    Havoc> this is done with the "fixed" manipulator:

AbiWord suffered from this in its PostScript output.  The %f format in
sprintf was localising the radix character (, or .).

I didn't see anything in the glibc docs to indicate how to turn off
looking up LC_NUMERIC to determine the radix character for the printf
family of functions.


ADML Support, EUCS, The University of Edinburgh, Scotland.

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