octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make check error default branch


From: marco atzeri
Subject: Re: Make check error default branch
Date: Thu, 09 Feb 2012 12:26:18 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0) Gecko/20120129 Thunderbird/10.0

On 2/9/2012 11:10 AM, CdeMills wrote:

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


./locale_try
terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid
Aborted (core dumped)

I am investigating on the cygwin mailing list

Regards
Marco


reply via email to

[Prev in Thread] Current Thread [Next in Thread]