Force the locale LC_ALL to be POSIX (in Hurricane::DataBase).
* Problem: In LEF/DEF, the parsers makes use of the libc "strtod()" which is now localized. So, if your environment is set up for French, the decimal separator is not '.' (dot) but ',' (comma). So floating numbers in LEF/DEF file are not longer recognized as such, causing the parsers to fail with a LEFPARS-1 error. To avoid that, we force the LC_ALL environment variable to POSIX in Hurricane::DataBase::create(). So first things that happens when Hurricane starts, is the environment to be reset. Strangely, when I try to setup only LC_NUMERIC with setlocale() it doesn't work. There is something I'm missing there...
This commit is contained in:
parent
3c849787e2
commit
dc01b60d5c
|
@ -17,6 +17,7 @@
|
||||||
// not, see <http://www.gnu.org/licenses/>.
|
// not, see <http://www.gnu.org/licenses/>.
|
||||||
// ****************************************************************************************************
|
// ****************************************************************************************************
|
||||||
|
|
||||||
|
#include <cstdlib>
|
||||||
#include "hurricane/Initializer.h"
|
#include "hurricane/Initializer.h"
|
||||||
#include "hurricane/Warning.h"
|
#include "hurricane/Warning.h"
|
||||||
#include "hurricane/Error.h"
|
#include "hurricane/Error.h"
|
||||||
|
@ -127,6 +128,8 @@ DataBase::DataBase()
|
||||||
DataBase* DataBase::create()
|
DataBase* DataBase::create()
|
||||||
// *************************
|
// *************************
|
||||||
{
|
{
|
||||||
|
setenv( "LC_ALL", "POSIX", 1 );
|
||||||
|
|
||||||
DataBase* dataBase = new DataBase();
|
DataBase* dataBase = new DataBase();
|
||||||
|
|
||||||
dataBase->_postCreate();
|
dataBase->_postCreate();
|
||||||
|
|
Loading…
Reference in New Issue