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

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

[Octave-bug-tracker] [bug #53914] textread / strread incorrectly reads s


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #53914] textread / strread incorrectly reads string
Date: Wed, 16 May 2018 04:27:24 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0 SeaMonkey/2.48

Update of bug #53914 (project octave):

                  Status:                    None => Confirmed              
                 Release:                   4.4.0 => dev                    
        Operating System:               GNU/Linux => Any                    
                 Summary: textread incorrectly reads string => textread /
strread incorrectly reads string

    _______________________________________________________

Follow-up Comment #1:

Try this (FYI strread is the backend of textread):

>> strread ("#  #", "%s", "delimiter", ",", "whitespace", "")
ans =
{
  [1,1] = #  #
}


In general, when reading strings containing spaces using
textread/strread/textscan, specify '"whitespace", ""' to avoid spaces being
left in the whitespace (= default delimiter) collection.

Matlab r2017b does a slightly better job with strread/testread, however its
textscan does the same as Octave's.
As TMW advises to not use textread/strread but invoke textscan instead I don't
think we'll do much about strread.m.
I did a lot of work at strread.m some years ago, I'm afraid that fixes for
this type of rare corner cases will require undue amounts of extra code.

Would you agree to just lower priority, as there's a good workaround?


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53914>

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




reply via email to

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