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

CLI: Enforce LC_NUMERIC=C on Posix systems (#16724) #16763

Merged
merged 2 commits into from
Sep 24, 2024
Merged

Conversation

AIRCAP
Copy link
Contributor

@AIRCAP AIRCAP commented Sep 23, 2024

Initialising Qt with native LC_NUMERIC affects XML import on CLI (freecad -c) This causes sketch constraints and potentially other components relying on numeric constants to break or have incorrect values. Forcing LC_NUMERIC to C avoids this issue and enforces reproducible behaviour on all locales. This does not affect the number format displayed in the GUI, as set in preferences.

AIRCAP and others added 2 commits September 24, 2024 00:31
Initialising Qt with native LC_NUMERIC affects XML import on CLI (freecad -c)
This causes sketch constraints and potentially other components relying on numeric constants to break or have incorrect values.
Forcing LC_NUMERIC to C avoids this issue and enforces reproducible behaviour on all locales.
This does not affect the number format displayed in the GUI, as set in preferences.
Copy link
Contributor

@bgbsww bgbsww left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This matches the behavior in Main/MainCmd.cpp and looks correct to me.

@luzpaz
Copy link
Contributor

luzpaz commented Sep 23, 2024

Congrats on your first PR to FreeCAD, @AIRCAP 🎉

@chennes
Copy link
Member

chennes commented Sep 24, 2024

Thanks for the PR (and the excellent bug report).

@chennes chennes merged commit b38c422 into FreeCAD:main Sep 24, 2024
9 checks passed
chennes pushed a commit that referenced this pull request Sep 24, 2024
* Enforce LC_NUMERIC=C on Posix systems (#16724)

Initialising Qt with native LC_NUMERIC affects XML import on CLI (freecad -c)

This causes sketch constraints and potentially other components relying on numeric constants to break or have incorrect values.

Forcing LC_NUMERIC to C avoids this issue and enforces reproducible behaviour on all locales.
This does not affect the number format displayed in the GUI, as set in preferences.
@chennes
Copy link
Member

chennes commented Sep 24, 2024

Cherry-picked to 1.0

wwmayer added a commit to wwmayer/FreeCAD that referenced this pull request Sep 27, 2024
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.

4 participants