Open
Description
Description
IECore.repr()
is using boost::lexical_cast
under the hood, which is locale sensitive. In some locales, this means the result cannot be parsed by Python.
Steps to Reproduce
Run python -c "import locale; locale.setlocale( locale.LC_NUMERIC, 'fr_FR.UTF-8' ); import IECore; import imath; print( IECore.repr( imath.V2f( 1.25 ) ) )
This outputs imath.V2f( 1,25, 1,25 )
but should output imath.V2f( 1.25, 1.25 )
Recommended solution
Reimplement IECore::repr()
using fmt::format()
, which is fast, and ignores locale unless explicitly requested.
Metadata
Metadata
Assignees
Labels
No labels