[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63968] fwrite writes incorrect number of byte
From: |
Arun Giridhar |
Subject: |
[Octave-bug-tracker] [bug #63968] fwrite writes incorrect number of bytes |
Date: |
Mon, 27 Mar 2023 10:54:29 -0400 (EDT) |
Update of bug #63968 (project octave):
Status: Duplicate => In Progress
Open/Closed: Closed => Open
Operating System: Microsoft Windows => Any
Planned Release: None => 8.2.0 (current stable)
_______________________________________________________
Follow-up Comment #3:
On second thought, looking at the file modes in the other two bugs and in this
one, there's something subtly different. The test code given in this bug
report writes numbers as uint8 but in text mode, not in binary mode, so there
needs to be an additional criterion to skip the text encoding to/from UTF-8.
Reopening as in progress.
All bugs related to the encoding problem:
* https://savannah.gnu.org/bugs/?63415 (wrong file size, binary mode)
* https://savannah.gnu.org/bugs/?63931 (wrong file data, binary mode)
* https://savannah.gnu.org/bugs/?63930 (wrong both, fprintf, text mode)
* https://savannah.gnu.org/bugs/?63968 (this one) (wrong both, fwrite, text
mode)
The first two seem to have been fixed by
https://hg.savannah.gnu.org/hgweb/octave/rev/fcd97a68e5f7 but that applies
only to binary mode.
The last two are in progress.
For anyone new coming across this report, it's the same workaround for all
bugs: set your encoding mode to UTF-8. In the GUI, it's under Edit /
Preferences / Editor tab / "Text encoding used for loading and saving". You
can also run the mfile_encoding command in comment #2 below.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63968>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/