marco atzeri-2 wrote
Hi Pascal,
there is something wrong in setting the locale for your test.
On cygwin "fr_FR" is a valid locale but the test is failing anyway
$ locale -a |grep fr_FR
fr_FR
fr_FR.utf8
address@hidden
$ grep -i locale config.h
/* Define to 1 if you have the<locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
octave:1> assert(sscanf('1,2', '%f', 'fr_FR'), 1.2)
error: assert (sscanf ('1,2', '%f', 'fr_FR'),1.2) expected
1.2000
but got
1
values do not match
Hello Marco,
the patch I proposed actually uses C++ locale mechanism, through the "imbue"
function. Could you try the enclosed C++ program and see it works the way it
should ? That is, reporting "Eur" as currency, "," as decimal separator, and
so on ?
Regards
Pascal
http://octave.1599824.n4.nabble.com/file/n4372381/locale_try.cpp
locale_try.cpp