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

Don't change the locale #43

Open
myrsloik opened this issue Aug 5, 2019 · 1 comment
Open

Don't change the locale #43

myrsloik opened this issue Aug 5, 2019 · 1 comment

Comments

@myrsloik
Copy link

myrsloik commented Aug 5, 2019

You can't change the locale if you're a library. It affects everything else that's also loaded and can actually cause locale related operations in other threads to crash. Apart from all the fun logic errors that can happen in applications that at least assume the decimal separator to be constant.

Just use snprintf_l (_snprintf_l on windows) and do it right. Or use C++ streams where the locale can be set locally as well.

@Khanattila
Copy link
Owner

Yeah, I definitely wrote this library not really optimally.
I had in mind to buy a Vega GPU and fix all the crap, but then the scarce availability and the crypto mining happened. Finally, with Navi GPU I should be able to do it.

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

No branches or pull requests

2 participants