Re: setlocale portability


Subject: Re: setlocale portability
From: Dom Lachowicz (cinamod@hotmail.com)
Date: Mon Apr 02 2001 - 08:33:55 CDT


Hub wrote:
>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.
>
>I'm about to check my fix on Linux/GNOME. This is a 3 LOC fix.

I'm not sure exactly what call the code in question uses, but does it have
anything to do with the functions in ut_units.h. Also, setlocale works XP:

http://www.abisource.com/lxr/source/abi/src/af/util/xp/ut_units.cpp#194

Dom
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com



This archive was generated by hypermail 2b25 : Mon Apr 02 2001 - 08:34:04 CDT