--- a/Beremiz_service.py Tue Feb 28 15:06:13 2023 +0100
+++ b/Beremiz_service.py Tue Feb 28 15:08:43 2023 +0100
@@ -186,6 +186,12 @@
return os.path.join(beremiz_dir, *args)
+import locale
+# Matiec's standard library relies on libC's locale-dependent
+# string to/from number convertions, but IEC-61131 counts
+# on '.' for decimal point. Therefore locale is reset to "C" */
+locale.setlocale(locale.LC_NUMERIC, "C")
+
def SetupI18n():
# Get folder containing translation files
localedir = os.path.join(beremiz_dir, "locale")
@@ -206,7 +212,6 @@
# Define locale domain
loc.AddCatalog(domain)
- import locale
global default_locale
default_locale = locale.getdefaultlocale()[1]