Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C Locale changed and not restored #16

Open
ramcdona opened this issue Jan 24, 2019 · 4 comments
Open

C Locale changed and not restored #16

ramcdona opened this issue Jan 24, 2019 · 4 comments

Comments

@ramcdona
Copy link

I haven't had time to fully investigate, but users of my program with a custom locale set report writing corrupted files after exporting IGES files. My program uses the C locale -- until libIGES changes it to something matching their system settings.

IMHO, libIGES should either not set the locale -- or it should restore the locale after it is done doing whatever it needs to set the locale for. At a minimum, the docs should make it very clear that libIGES may change the locale.

@cbernardo
Copy link
Owner

cbernardo commented Jan 24, 2019 via email

@ramcdona
Copy link
Author

Thanks much,

My program does not set the locale -- so it stays as the C locale. I suspect when libIGES finishes writing, it re-sets to some locale specified by the system or environment variables (not to a stored variable set to the locale before libIGES changed it).

I could force the C locale before writing anything, but it was very unexpected to have it change.

@cbernardo
Copy link
Owner

I altered the behavior of libiges slightly. The previous behavior was to set the locale to the default environment; now the locale is set to whatever the setting was when libiges was invoked to read/write a file. So if the locale was set to "C" when a load/save function was called, it should remain as "C". Let me know if this fixes the problem.

@ramcdona
Copy link
Author

ramcdona commented Mar 12, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants