For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Strange setLocale call in Storage_Schema::ICreationDate()

Markus Rhein's picture
Forums: 

What is the purpose of the line 1549
(void)setlocale(LC_ALL, "");
in Storage_Schema.cxx, Storage_Schema::ICreationDate()?
And more important why is the locale not set back, like LC_NUMERIC in the same function? This function gets called everytime I use the OCC save mechanism. This (for me) unrecognized change of the localization messed things up in the rest of my application.

As a fix I used the OSD_Localizer to encapsulate my OCC calls and prevent interference with my own localization settings.
But I think this should still be considered a bug.

Markus Rhein's picture

I don´t think OSD_Localizer is working as intended.
Is it possible that the variable myLocale can get corrupt before restore () gets called?

Also I would suggest restoring the original localization settings in the destructor of OSD_Localizer.

Forum supervisor's picture

Dear Markus,
I would like to inform you that the posted problem is checked and accepted as a bug.
The corresponding issue with ID = 22808 has been registered.
Later you can know if the issue is resolved by checking references to the specified ID in OCCT Release Notes. The analysis of the issue will take some time depending on our technical capability and availability of resources.
Thanks for your contribution.

Denis Barbier's picture

You can comment out all calls to setlocale here, this function does not use locales. (Ditto in XmlLDrivers.cxx)

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.