--- 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)
+# 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") # Get folder containing translation files
localedir = os.path.join(beremiz_dir, "locale")
@@ -205,7 +211,6 @@
default_locale = locale.getdefaultlocale()[1]
--- a/targets/Linux/plc_Linux_main.c Fri Feb 17 11:41:58 2023 +0100
+++ b/targets/Linux/plc_Linux_main.c Tue Feb 21 11:38:45 2023 +0100
@@ -108,7 +108,6 @@
#define maxval(a,b) ((a>b)?a:b)
int startPLC(int argc,char **argv)
- setlocale(LC_NUMERIC, "C");
--- a/targets/Win32/plc_Win32_main.c Fri Feb 17 11:41:58 2023 +0100
+++ b/targets/Win32/plc_Win32_main.c Tue Feb 21 11:38:45 2023 +0100
@@ -82,7 +82,6 @@
unsigned long thread_id = 0;
- setlocale(LC_NUMERIC, "C");
debug_sem = CreateSemaphore(
NULL, // default security attributes