--- a/Beremiz_service.py Fri Feb 17 11:41:58 2023 +0100
+++ b/Beremiz_service.py Tue Feb 21 11:38:45 2023 +0100
@@ -185,6 +185,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")
@@ -205,7 +211,6 @@
# Define locale domain
loc.AddCatalog(domain)
- import locale
global default_locale
default_locale = locale.getdefaultlocale()[1]