Add a New Comment (Rich Markup)
I have pushed a slightly modified version of the patch here: http://hg.savannah.gnu.org/hgweb/octave/rev/284e5c87f27b This should soon become part of Octave 3.8.1
Thanks, Jordi, I tried the patch with RC2 and it works fine for the cases that I tested. Since your patch changes the internal representation of variables in the saved text files, it can break in situations where the old behavior was expected. For instance, people that saved uint8 variables in text files in the past would be unable to read their files now. These should be corner cases, but a fallback solution could be provided for them.
I attach a proposed fix for this problem. I'm not sure if this fix should go into the impending release, though. I think it's safe, but I am not sure. (file #30061)
The bug report reproduced below was submitted against the Debian package octave_3.6.4-4. This bug is also present in version 3.8.0-rc1. The URL of the bug report is http://bugs.debian.org/732659 -- Forwarded message from Kacper Gutowski <mwgamera@gmail.com> [2013-12-20 04:28]: When a variable of class uint8 is saved in the default text format, it's actually written out in binary (one byte per element) instead of plain text like every other type. I don't know whether this is intended or not, but file containing such variable can be loaded only if said variable had no elements of values 9, 10, 11, 12, 13, or 32. These correspond to white characters in ASCII and apparently "load" gets confused by them. Minimal example to reproduce the problem:
octave -q --no-init-file octave:1> a = uint8(10); octave:2> save 'a' a octave:3> load 'a' error: load: failed to load scalar constant error: load: trouble reading ascii file 'a' error: load: reading file a
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only project members can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 5 latest changes.
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.12