[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:30:42 -0400 (EDT) |
Follow-up Comment #2, bug #63968 (project octave):
I ran your code and this is the output I got with both the unpatched and
patched versions, so this looks like good news?
octave:1> test_63968
Writing File
Wrote 16386810 bytes
File Pointer 16386810
Write took 95.057924 seconds
Reading File
Read took 0.087963 seconds
Read 16386810 bytes
File Pointer 16386810
Reading File
Read took 141.914758 seconds
Read 16386810 bytes
Then to double-check, I set the encoding to latin1, and sure enough I got the
error:
octave:1> __mfile_encoding__ ("latin1")
octave:2> __mfile_encoding__
ans = latin1
octave:3> test_63968
Writing File
Wrote 16386810 bytes
File Pointer 16277485
Write took 99.510554 seconds
Reading File
Read took 0.088034 seconds
Read 16277511 bytes
File Pointer 16277511
Reading File
Index 254 Index 76 Index 251 Read Failure
File Pointer 16277511
error: Invalid Read
error: called from
test_63968 at line 49 column 9
This is identical to the other two bugs, so I'll leave this closed as a
duplicate but if you want a workaround before 8.2.0 is released, please set
your encoding to UTF-8. You can do that in the Octave GUI, or from the command
prompt you can run
__mfile_encoding__ ("utf-8")
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63968>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/