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

Set locale to ensure dots are recognized as decimal points in SWC files #442

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

adrien-berchet
Copy link
Member

@adrien-berchet adrien-berchet commented Apr 13, 2023

In some cases, the function sscanf does not recognize dots as decimal points because of the locale settings of the user (french in my case, so sscanf expects commas as decimal points). This PR ensures that dots are always considered as decimal points in SWC files, regardless of user locale settings.

@mgeplf
Copy link
Contributor

mgeplf commented Apr 13, 2023

I'll look at this; I've wanted to remove the sscanf for a while; but I'm not super happy about how iostreams handle locales, either. Plus, I think it was slower.

@adrien-berchet
Copy link
Member Author

Ah ok. As you prefer, this is just a quick fix but we could think about something better.

@adrien-berchet
Copy link
Member Author

Is #460 supposed to replace this PR @mgeplf ?

@mgeplf
Copy link
Contributor

mgeplf commented Jul 4, 2023

Yeah, that's the plan.

@adrien-berchet
Copy link
Member Author

Yeah, that's the plan.

Ok!

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

Successfully merging this pull request may close these issues.

None yet

2 participants