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

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

[Octave-bug-tracker] [bug #52681] Bad reading for UTF-8 characters with


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #52681] Bad reading for UTF-8 characters with fscanf()
Date: Tue, 26 Dec 2017 14:15:40 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #15, bug #52681 (project octave):

I know what you are thinking.  My experience is generally with programming in
all types of languages, especially low level code, is that changing the role
of a sign bit typically has some consequence somewhere else.  But, as far as
testing, I'm not sure how the development branch would really test this right
now.  There appear to be only a few places that fscanf is used:


linux@ ~/octave/octave/octave $ grep -r fscanf scripts/*
scripts/io/textread.m:## @seealso{strread, load, dlmread, fscanf, textscan}
scripts/io/textread.m:  [str, count] = fscanf (fid, "%c", BUFLENGTH);
scripts/io/textread.m:      [nstr, count] = fscanf (fid, "%c", BUFLENGTH);
scripts/io/textread.m:    str = fscanf (fid, "%c", eoi_pos);
scripts/io/strread.m:## @seealso{textscan, textread, load, dlmread, fscanf}
scripts/plot/util/private/__gnuplot_ginput__.m:        [x(k), y(k), button(k),
count] = fscanf (gpin, "%f %f %d", "C");
scripts/plot/util/print.m:  latex = fscanf (fid, "%c", Inf);
scripts/plot/util/__gnuplot_drawnow__.m:      [a, count] = fscanf (fid, '%c',
Inf);


textread() has a few internal test scripts, several with "%s", but doesn't
appear to be used anywhere else.  (The alternate method for reading the
example file that I gave uses textscan(), which apparently uses a different
route, I guess.)  Maybe it is in the packages that fscanf() gets used more.

Perhaps the easiest thing is to add some tests to fscanf() that include UTF-8
characters.

When is the next minor release?  You were thinking before the end of the year,
but JWE mentioned another schedule the other day.

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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