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 13:01:39 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0

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

@Andrew: Yeah. If we were to make some changes here, I think we should start
with "traditional single byte encodings" (quite easy) and UTF-8 (not quite as
easy but manageable) first.
If I recall correctly, the first should be working already.

If I remember correctly, it's not as easy as it may sound to read from files
that are not byte-based with the current implementation of reading files in
Octave. (But I haven't looked at it in a while and might be mis-remembering.)

What I don't understand: If you are arguing that for UTF-16, "one character"
should be one two-byte "UTF-16 code unit" instead of one Unicode code point,
why don't you also argue that, for UTF-8, "one character" should be one
one-byte "UTF-8 code unit"?

Or did I misunderstand?

If you are hinting on whether the "char" type in Octave should have a size of
one or two bytes: That is another issue and should be kept separate from this
bug.
Please, open a new report or write to the maintainers list if you think this
should change.

    _______________________________________________________

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]