bugGNU Octave - Bugs: bug #57133, stdout disabled by char 128...255

 
 

bug #57133: stdout disabled by char 128...255

Submitter:  None
Submitted:  Mon 28 Oct 2019 04:17:52 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Confirmed Assigned to:  None
Originator Name:  Kevin Oler Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * 6.2.0
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 17 Mar 2021 08:31:21 AM UTC, comment #5: 

This is still an issue with Octave 6.2 on Windows 10.

It looks like the output stream to the Windows conhost is broken by the invalid byte sequence.

Hopefully this will disappear if/when we switch to a cross-platform Qt widget for the command window in the GUI.

See also:
https://octave.discourse.group/t/new-command-window-widget/501

Markus Mützel <mmuetzel>
Group administrator
Sun 03 Nov 2019 05:26:15 PM UTC, comment #4: 

@koler, what OS are you running on here?

Works for me on macOS 10.14.6: `fprintf(stdout, '%s\n', 128)` emits the "invalid character" placeholder glyph, and subsequent output works as normal.

Andrew Janke <apjanke>
Sat 02 Nov 2019 03:55:30 PM UTC, comment #3: 

Octave uses UTF-8. char(128) is an invalid byte sequence in UTF-8. That seems to mess up the console.
This might be related to bug #56224 but is probably a slightly different problem.

Markus Mützel <mmuetzel>
Group administrator
Tue 29 Oct 2019 01:44:37 AM UTC, comment #2: 

Marking as a dependency of bug #56224 which also describes a problem with the Windows terminal when displaying characters above the 7-bit ASCII charset.

Rik <rik5>
Group administrator
Mon 28 Oct 2019 04:27:13 PM UTC, comment #1: 

This was submitted by user koler; regrettably I signed up after submitting this bug.

Kevin Oler <koler>
Mon 28 Oct 2019 04:17:52 PM UTC, original submission:  

% This statement seems to lock up stdout. 
fprintf(stdout, '%s\n', 128);

% From now on, stdout shows no output (e.g. using disp, display, fputs, fprintf).
disp(2);
fputs(stdout, "Hello\n");
fprintf(stdout, 'Hello\n');
% This condition can be cleared by exiting and re-starting Octave.

% Each of these statements also lock up stdout.
fprintf(stdout, '%s\n', rand*128+128); % Any number in the range 128....255.
fprintf(stdout, char(128));
fputs(stdout, char(128));

% Tested in Octave 4.4.1 and 5.1.0.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by apjanke (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by koler (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    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 group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-03-17 mmuetzel Release5.1.0 6.2.0
    2019-11-02 mmuetzel StatusNone Confirmed
    2019-10-29 rik5 Carbon-CopyRemoved 72865 -

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code