Mercurial > octave
changeset 17811:ef4fc092c86b
set LC_NUMERIC local to "C" for CLI and GUI (bug #40422)
* octave.cc (octave_initialize_interpreter): Set LC_NUMERIC here.
* octave-main-thread.cc (octave_main_thread::run): Not here.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 30 Oct 2013 19:18:25 -0400 |
parents | 6da521da1c70 |
children | fffd0c0ca2dc |
files | libgui/src/octave-main-thread.cc libinterp/octave.cc |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/octave-main-thread.cc Wed Oct 30 19:04:15 2013 -0400 +++ b/libgui/src/octave-main-thread.cc Wed Oct 30 19:18:25 2013 -0400 @@ -25,7 +25,6 @@ #include <config.h> #endif -#include <clocale> #include <string> #include "builtin-defun-decls.h" @@ -39,9 +38,6 @@ void octave_main_thread::run (void) { - // Matlab uses "C" locale for LC_NUMERIC class regardless of local setting - setlocale (LC_NUMERIC, "C"); - octave_initialize_interpreter (octave_cmdline_argc, octave_cmdline_argv, octave_embedded);
--- a/libinterp/octave.cc Wed Oct 30 19:04:15 2013 -0400 +++ b/libinterp/octave.cc Wed Oct 30 19:18:25 2013 -0400 @@ -27,6 +27,7 @@ #endif #include <cassert> +#include <clocale> #include <cstdlib> #include <cstring> #include <ctime> @@ -704,6 +705,9 @@ void octave_initialize_interpreter (int argc, char **argv, int embedded) { + // Matlab uses "C" locale for LC_NUMERIC class regardless of local setting + setlocale (LC_NUMERIC, "C"); + octave_embedded = embedded; octave_env::set_program_name (argv[0]);