On Mon, 2 Apr 2001, Hubert Figuiere wrote:

 Hi, 

> Joaquin Cuenca Abela �crit:
> 
> >> My question is how portable is setlocale() to revert locale back to "C" when 
> >> writting the file ? Because setlocale() can be the solution to the problem. 
> > 
> > I don't know, but I remember that the same problem was raised once upon
> > a time when we were writting colors in the .ps file (I think that a
> > portugues dude solved the problem).
> 
> The fix is like mine: surround sprintf(%f) with setlocale() call to use C 
> locale. This fix is in UNIX code.
> This time the problem arise in XP code. That's why I'm wondering about 
> portabibility outside UNIX code. setlocale() is supposed to be part of 
> POSIX, but some platform may not support it. Perhaps I should write a UT 
> wrapper for this. 

 Yes, having a wrapper would be convenient.
 Grepping over source tree it turns out that most of platforms we support
do support setlocale (unix, beos, qnx) - so we need a wrapper that will do
nothing of win32 and call setlocale on other platforms..

> I'm about to check my fix on Linux/GNOME. This is a 3 LOC fix. 
> 
> 
> Hub 
> 

 Best regards,
  -Vlad


Reply via email to