* Bug #13925 fixed - SciNotes used the wrong paired bracket highlight style.
+* Bug #14524 fixed - Numeric locales were not set to standard "C" by default at scilab startup
+
Changes between version 5.5.1 and 5.5.2
*/
#include "InitScilab.h"
#include "InitializeCore.h"
+#include "locale.h"
#include "../../../console/includes/InitializeConsole.h"
#include "../../../tclsci/includes/InitializeTclTk.h"
#include "../../../localization/includes/InitializeLocalization.h"
loadGraphicModule();
}
+ // set default (English) locale after JVM which may set its own locale
+ setlocale(LC_NUMERIC, "C");
+
/* Initialize console: lines... */
InitializeConsole();
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2016 - Scilab Enterprises -
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- Non-regression test for bug 14524 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/14524
+//
+// <-- Short Description -->
+// Numeric locales were not set to standard "C" by default at scilab startup
+format('e',10)
+disp(1/2)
+ 5.000D-01
+disp(0.5)
+ 5.000D-01
+format('v',10)
+disp(1/2)
+ 0.5
+disp(0.5)
+ 0.5
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2016 - Scilab Enterprises -
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- Non-regression test for bug 14524 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/14524
+//
+// <-- Short Description -->
+// Numeric locales were not set to standard "C" by default at scilab startup
+
+format('e',10)
+disp(1/2)
+disp(0.5)
+
+format('v',10)
+disp(1/2)
+disp(0.5)
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2016 - Scilab Enterprises -
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- Non-regression test for bug 14568 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/14568
+//
+// <-- Short Description -->
+// strtod() fails in some locale conditions
+// No way to set locale for the current test => run another test with a modified locale
+setenv("LC_ALL", "fr_FR.UTF-8");
+status = test_run("string", "bug_14568_test", ["no_check_error_output", "no_check_ref", "short_summary"]);
+ 001/001 - [string] bug_14568_test............................passed
+
+ --------------------------------------------------------------------------
+ Tests: 1, Passed: 1, Failed: 0, Skipped: 0
+ --------------------------------------------------------------------------
+assert_checktrue(status);
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2016 - Scilab Enterprises -
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- Non-regression test for bug 14568 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/14568
+//
+// <-- Short Description -->
+// strtod() fails in some locale conditions
+
+// No way to set locale for the current test => run another test with a modified locale
+
+setenv("LC_ALL", "fr_FR.UTF-8");
+
+status = test_run("string", "bug_14568_test", ["no_check_error_output", "no_check_ref", "short_summary"]);
+
+assert_checktrue(status);
\ No newline at end of file
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2016 - Scilab Enterprises -
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+
+// This test is run by 14568 test, with test_run() command with a modified locale
+
+assert_checkequal(strtod("0.5"), 0.5);
+