From cec90a0ff255a8badf7942cc8922207fb67a5b84 Mon Sep 17 00:00:00 2001 From: Matthieu Bouron Date: Fri, 1 Sep 2023 23:16:21 +0200 Subject: [PATCH] utils/qml: force C locale to ensure consistent float parsing --- pynopegl-utils/pynopegl_utils/qml/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pynopegl-utils/pynopegl_utils/qml/__init__.py b/pynopegl-utils/pynopegl_utils/qml/__init__.py index 051b81e03..58ca1578f 100644 --- a/pynopegl-utils/pynopegl_utils/qml/__init__.py +++ b/pynopegl-utils/pynopegl_utils/qml/__init__.py @@ -19,6 +19,7 @@ # under the License. # +import locale import os import os.path as op import platform @@ -51,6 +52,10 @@ def create_app_engine(argv, qml_file): QQuickWindow.setGraphicsApi(QSGRendererInterface.OpenGL) engine = QQmlApplicationEngine(qml_file) engine.quit.connect(app.quit) + + # Force C locale to ensure consistent float parsing + locale.setlocale(locale.LC_ALL, "C") + return app, engine