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

math::parseFloat is locale-dependent #215

Closed
darksylinc opened this issue Jul 26, 2021 · 2 comments
Closed

math::parseFloat is locale-dependent #215

darksylinc opened this issue Jul 26, 2021 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@darksylinc
Copy link

Environment

  • OS Version: Ubuntu 18.04 LTS
  • Source or binary build? ign-math6 9519ce7

parseFloat relies on std::stod which is locale-dependent.

When using my locale LC_NUMERIC=es_AR.UTF-8; the Collada importer in ign-common/graphics/src/ColladaLoader.cc will end up reading garbage. Hence this little sensor:

Collada

will end up looking like this:

BadMarv

This bug is related to gazebosim/gz-common#120 and gazebosim/gz-rendering#365

Description

  • Expected behavior: Collada loads the importer correctly
  • Actual behavior: Collada loads a triangle soup

Steps to reproduce

  1. Launch LC_ALL=es_AR.UTF-8 ign gazebo near_clip.sdf using near_clip.sdf

Workaround

Launching gazebo with LC_ALL=C fixes the issue.

Output

@j-rivero
Copy link
Contributor

I'm centralizing the information and issues related to locale independent conversions in gazebosim/gz-common#233. PRs are very welcome :)

@chapulina chapulina added the help wanted Extra attention is needed label Jul 26, 2021
@azeey
Copy link
Contributor

azeey commented Oct 5, 2023

Closing in favor of gazebosim/gz-common#233.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants