octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #60533] some Octave functions unable to read a


From: Rik
Subject: [Octave-bug-tracker] [bug #60533] some Octave functions unable to read ascii data file if D used as exponential separator
Date: Wed, 5 May 2021 18:03:26 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36

Update of bug #60533 (project octave):

                  Status:                    None => Confirmed              

    _______________________________________________________

Follow-up Comment #2:

Localizing the problem.  dlmread calls read_value<double> which is located in
liboctave/util/lo-utils.cc.  In turn, this eventually calls read_fp_value in
the same file.  The eventual code is


        is >> val;


We are relying on the C++ stream libraries for reading "val" and those
libraries understand 'e' for exponent but not 'd' for exponent.  There might
be a way to hack the libraries in to recognizing 'd' for 'e' by making one's
own locale.  This sounds difficult though.  Otherwise, we would need to write
our own stream input routine that would read character-by-character and
assemble a number.  That is precisely what the C++ library does and it sounds
like a lot work to replicate that.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60533>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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