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

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

[Octave-bug-tracker] [bug #57596] Should the "len" argument of "fgetl" a


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #57596] Should the "len" argument of "fgetl" and "fgets" mean bytes or characters?
Date: Wed, 10 Jun 2020 09:23:51 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #7, bug #57596 (project octave):

Was the change of the category to "documentation" intentional?

This would require some non-trivial changes to the functions that read text
from files (keep counting the number of characters that have been read so far,
read ahead until a byte sequence is complete).
One of the complications is that there are "invalid byte sequences" in some
multibyte encodings (e.g. UTF-8 or UTF-16). There are several possible ways
how those could be treated. All with their own implications.

Next question is: What about composite characters? Those consist of one
regular character followed by one or several combining characters. Should
those be treated as one character as well? After all, the combining characters
cannot be used on their own...

This gets quite complicated very quickly...

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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