On 2009-09-04 11:00-0700 Alan W. Irwin wrote:

> My reading of
> the man page for setlocale indicates we can store the current locale in an
> opaque character string using a NULL locale string as an argument [...]

As far as I know, nobody has tested qt on windows so I am not even sure
Werner's setlocale fix would even build in that case, much less work
properly.  Any more general fix for the locale issue necessarily must use
the setlocale function (just like Werner's fix did).  Thus, until setlocale
is actually tested on Windows I am extremely uncomfortable inserting
untested (in a cross-platform sense) calls to that function into our code
this close to our release.

Accordingly just for this release (revision 10370) I have commented out all
the recent locale changes (which means setlocale will never be called by
PLplot for this release just as for all previous releases).  The downside of
this conservative approach is that our palette colour file won't be readable
if _any_ application or library that calls PLplot, fiddles with the
LC_NUMERIC locale in such a way to change the decimal separator from period
to commma and similarly if any library that PLplot calls (such as Qt4)
fiddles with the LC_NUMERIC locale in the same way.  Thus, if some user uses
the Carbon packages for Qt4 on OS X (which apparently does mess with the
LC_NUMERIC locale although the corresponding cocoa packages apparently do
not) that user will get a warning message and will have warning colours (red
on white for cmap0 and red scale for cmap1) used for the default palettes.

This is not a particularly satisfactory solution (in fact it is no solution)
to the issue of external library or application LC_NUMERIC locale changes
screwing up PLplot, but I think that is the best I can come up with this
close to release.  Just after the release I intend to do a good
implementation of this (saving and restoring locale appropriately) using
setlocale.  This should give us plenty of time to test the implementation
(i.e., make sure setlocale works as intended) on all our platforms before
the next release.

I plan to do a bit more testing tommorrow, but basically I should be done
making commits for this release.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to